Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using tSystem to run a Python script.
I am trying to use tSystem_1_EXIT_VALUE to know if the script was able to run. In the Python script, i have added a divided by zero which makes the script fails. On the console, I see the error output. I have tried to print the result by using tJavaRow ( System.out.println(((Integer)globalMap.get("tSystem_1_EXIT_VALUE"))); ) but I always get null!
I want to do a RunIf with the boolean output of EXIT_VALUE.
PS In tSystem, I did set up the output to both Console and Global Variable.
Thanks in advance
Hi sboivin,
Do not use tJavaRow, use tJava.
I have provided the flow below, please follow as directed.
tSystem -> Run IF (condition is : "true") -> tJava -> Run If (Condition is : ((Integer)globalMap.get("tSystem_1_EXIT_VALUE"))==1) -> tSendMail
Thanks and regards,
Subhadip
Hello,
tSYstem EXIT VALUE is an after variable an tJavaRow is used in Flow manner. Therefore you will always have null when you print in tJavaRow. Use tSystem ->runIf(true)->tJava and then Sysout to print the EXIT_VALUE.
Thanks and Regards,
Subhadip
Hi,
use like this :
tSystem -> Run IF (condition is : "true") -> tJava -> Run If (Condition is : ((Integer)globalMap.get("tSystem_1_EXIT_VALUE"))==1) -> tSendMail
Thanks and regards,
Subhadip
I am not able to do a RunIf on the tJavaRow, I get the 'not' sign. But then again do I really need it? I was just using it for debug purpose.
When I do the RunIf from tSystem to tSendEmail, I get an error, I am not able to save the condition.
Is it because I need to declare the variable in tSystem? I didn't do anything since it was a global variable in the description of tSystem.
Hi sboivin,
Do not use tJavaRow, use tJava.
I have provided the flow below, please follow as directed.
tSystem -> Run IF (condition is : "true") -> tJava -> Run If (Condition is : ((Integer)globalMap.get("tSystem_1_EXIT_VALUE"))==1) -> tSendMail
Thanks and regards,
Subhadip
Thanks Subhadip, it works
I didn't see the tJava previously! Thanks for your help.