Return Code from tSystem calling of a windows batch script?

One Star

Return Code from tSystem calling of a windows batch script?

Hi All,
If anyone has some experience your help would be GREATLY appreciated!
I am calling a batch script through a tSystem component. I have added an IF condition into the batch script so as to determine which tasks get carried out in the batch script.
My problem, based on the tasks that run (and the exit code they produce) I need to tell Talend whether to continue with the flow or exit gracefully by sending me an e-mail.
I am using the "exit /b" syntax so as to set the 'errorlevel' on exit of the batch file (windowsXP 32 bit machine).

How can I code the RUN IF statement in Talend so as to see and make use of the return code from the batch script that is running within the tSystem component?? This is my challenge!
If anyone has any idea's on the best way to achieve this kind of conditional IF processing with Talend/or using a manually set errorlevel from a batch script (the route I am trying) your help would be most appreciated!!
Thanks
TinTin
One Star

Re: Return Code from tSystem calling of a windows batch script?

so as to make things clearer, this is what I would like from my Talend flow...
I need to state that if the batch script that is run by tSystem (the one with the error in the image) returns with an exit code of 0, to continue to the next script (this is my RUN IF Talend statement that I'm struggling with as per my post above),else, if the script returns a failed error code (1) then I would like to divert the flow to call the tSendmail and then exit?
Hope I'm making sense!
Thanks
Six Stars

Re: Return Code from tSystem calling of a windows batch script?