Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
MichelePuopolo
Contributor
Contributor

tRunJob with retry and parallelization paradigm

MichelePuopolo_0-1732618414018.png

Hello, I'm working on a projet with parent JOB and CHILD JOB.

I need to implement a RETRY pattern in CHILD JOB and a PARALLELISM.

As the picture: 

  • tDBInput_2 and tFlowToIterate_1 are user to get a list of target database et start the parallelism
  • tJava_1 initiate the loop with context variable ( context.status=1; )
  • tLoop_1 : condition i<5 && context.status==1.  Used to implement the RETRY.
  • RequestETLData : is the CHILD JOB, the job have a outup value "errorCode".  errorCode = 0 means no error.
  • tJavaRow_1 : used to update context.status variable.   below the code

 

 

 

if(row2.errorCode==0){
   context.status=0;
}else if(row2.errorCode==1){
   context.status=1;
   Thread.sleep(6000);
}else{
   context.status=0;
}

 

 

 

 

I'm not sure that this design approch is correct... mix a retry pattern with a parallelim using context variable.

In my test it seems that without parallelism it works fine, but with a parallelism the result is random

Labels (2)
1 Reply
MichelePuopolo
Contributor
Contributor
Author

Hello,

I spend some time to reproduce our projet. (as attached)

Atm I'm sure that the paradigm RETRY and PARALLELISM didn't works with my code design.

I'll going to manage the RETRY system in the child Job and delete the tLoop component.