I use tRest to call web service, according to the return result , if error,retry 10 times ;else empty or has data, write to csv. How do i design the job structure ? I am a bit confused with the different connections.
Hi
Try to design the job looks like:
main job: define a context variable called condition, this variable will be used for the condition on tLoop component.
tLoop--iterate--tRunJob--oncomponentok--tjava1
--oncomponenterror--tjava2
on tLoop: set the condition field with context variable: context.condition.
on tRunJob: call the child job, check the 'die on error' option.
on tJava1:
context.condition=false; on tJava2:
if(iteration_number<11){ context.conditon=true; }else{ context.conditon=false; } child job:
tRest--main--tlogRow
Best regards
Shong
Thanks. Could we incorporate time also here. Actually, if rest api is down, i want to retry for 10 times but after interval of 5 mins. Can we achieve this?