Six Stars

logic implemention

Hi All,

 

PFA screen shot.

 

FLOW:

 

Parent-Job1:

tinfinitteloop===>iterate(order1)====>tRunJob1

                    ====> iterate(Order2)===>tsleep

 

child job:

1) comparison between two tables based on date values.

2) if match found i.e >=1 execute remaining logic.

 

Requirement: 

After execution of child job.which is >=1.

stop the child job.

return to parent job.

else

continue loop

 

Please let me know if need any information. It's urgent 

  

Thanks

Shree

 

1 REPLY
Community Manager

Re: logic implemention

Hi
You should use tLoop with while type to implement this kind of logic, set the condition with a context variable, boolean type, it is true by default. The job looks like:
main job:
tLoop--iterate--trunJob--main--tJavaRow

on tRunJob: uncheck the 'die on error' option.
on tJavaRow:
if(input_row.status.equals("ok"){
context.condition=false;
}else{
context.condition=true;
}

child job:
...
--subjobok-->tFixedFlowInput1--main--tBufferOutput1
--subjoberror-->tFixedFlowInput2--main--tBufferOutput2

on tFixedFlowInput1, define one column called status, and set its value as "ok".
on tFixedFlowInput2, define one column called status, and set its value as "failed".

Hope it helps you!

Regards
Shong

----------------------------------------------------------
Talend | Data Agility for Modern Business