Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to call next components after completion of multiple if conditions.

Hi,

 

How to call next components after completion of multiple if conditions.

 

PFA screen shot for your references.

 

How to call after tfileCopy1 to tfileCopy3  is on components OK or if any one or two or all components OK .

 

Then only run the next any components like toracleSP_t etc.

 

Thanks

Shree

 

 

 

Thanks

Shree

Labels (2)
17 Replies
Anonymous
Not applicable
Author

Hello,

This OnSubjobOK (previously Then Run) connection is used to trigger the next subjob on the condition that the main subjob completed without error. This connection is to be used only from the start component of the Job.

Best regards

Sabrina

Anonymous
Not applicable
Author

Hi Sabira,

 

I have tried that option still l am facing it is not executing by order. 

 

Let me know why it is not executing by order even i declare order by last.

 

PFA file for reference.

 

Thanks

Shree


muti.PNG
Anonymous
Not applicable
Author

Hi,

 There is no order for If else conditions(order1, order2, order3, order4, order5). The multiple if else conditions will be triggered at the same time as long as  the condition defined is met.

Best regards

Sabrina

Anonymous
Not applicable
Author

Hi,

 

Okay, How to achieve if all (if all condition is satisfied or either of). Then only run the next components without trigger subok component.

 

Thanks

Shree

Anonymous
Not applicable
Author

Hello,

Would you mind posting your whole job design on forum which will be helpful for us to understand your work flow?

Many thanks.

Best regards

Sabrina

Anonymous
Not applicable
Author

Hi there,

 

If you need to guarantee execution order of your conditionally run sub-jobs, then just use multiple tJava components chained via OnSubjobOk triggers.

 

If later you need to know which, if any have of these have run, simply set a flag with tSetGlobalVar in each sub-job, and these can be used in expressions for future Run Ifs etc.

 

Regards,

 

 

Chris

Anonymous
Not applicable
Author

Hi Chris,

 

Sure, let me try this one.

 

Could you please give flow of components would be very helpful.

.

Thanks

Shree

 

Anonymous
Not applicable
Author

Hi Sabira.

 

I can't complete job. PFA screenshot for your references.

 

twaitfile: used wait for file. 

tfileist: File placing directory.

tjava2: used to substring the file pattern and store into the context variables.

 

PFA code for tjava2 components. 

 

Thanks

Shree

 


code.txt
Anonymous
Not applicable
Author

Based on your first screen grab, you would have three tJava components, each with a single Run If (with the same expression you're currently using) and then the sub-jobs from these would each have a tSetGlobalVar after the tFileCopy component setting a Boolean variable to indicate that the sub-job had indeed run.

 

Each of the tJava components would be linked, in the order you wish to sub-jobs to be conditionally executed, with a OnSubjobOk trigger.

 

If necessary, you could reference the Boolean global variables set in each sub-job later in the job to see if any, all, or a specific combination of the sub-jobs ran.

 

Of course, it you just need to know whether ANY of the sub-jobs ran, you can use a single global Boolean variable.