I am trying to execute a code in tsystem and then depending on exit code i am taking relevent steps.
Now if the exit code is not 0 i want to retry executing it 5 times and even after 5 times if the error code is not 0 i don't want to execute any more and move to other part of job.
How can i achieve this. Any help appreciated.
Using a tJava component in the loop, you may count the number of retry and store the result in a global variable (let's say "your_retry_count").
Now you can have a tLoop (type While) with the following condition:
((Integer)globalMap.get("tRunJob_1_CHILD_RETURN_CODE")) != 0 && ((Integer)globalMap.get("your_retry_count")) < 5
Watch the recorded webinar!
Accelerate your data lake projects with an agile approach
Create systems and workflow to manage clean data ingestion and data transformation.
Introduction to Talend Open Studio for Data Integration.