We have an adaptor that runs several custom tools. We're able to parse the output of many of the tool using Regex, but we have a new tool that has no output; it just has a return code of 0 (pass) or 1 (fail).
I'd like to fail the adaptor if this tool comes back with a fail, but according to the adaptor docs, there's no way to check the return code of a command run by an <execute> block.
I'm able to modify the tool to print something to stdout, but I didn't want to do this if I didn't have to.
Has anyone else been able to get the return code of a command run with <execute> from within an adaptor? Is this possible? If so, how do you do it?
Thanks for your time,
Pinned topic How can I get the return code of a command run with <execute> in an Adaptor
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-05-12T07:07:58Z at 2010-05-12T07:07:58Z by sngping
drnilsson 060001TR1E1 Post
Re: How can I get the return code of a command run with <execute> in an Adaptor2010-05-11T21:22:00ZThis is the accepted answer. This is the accepted answer.Not sure if it is what you need, but it sounds like it may solve the issue. Do you think you could save the return in a variable and then test the variable in a conditional step? I did something like this on a project and it worked well.
SystemAdmin 110000D4XK805 Posts
Re: How can I get the return code of a command run with <execute> in an Adaptor2010-05-11T22:00:49ZThis is the accepted answer. This is the accepted answer.
- drnilsson 060001TR1E
What syntax did you use in the adaptor to get the return code of a process launched with <execute>? The docs dont mention anything like this.
sngping 270001Y6HM1 Post
Re: How can I get the return code of a command run with <execute> in an Adaptor2010-05-12T07:07:58ZThis is the accepted answer. This is the accepted answer.There is no way other than using the <resultsblock> coupled with <match> tag to parse the output of <execute>, unless I am missing something like you.