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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vidya821
Creator
Creator

Error handling for job

Hi All,

 

Can anyone please explain me the concept of error handling.

How can i track the child jobs errors in parent job so that i can send an error mail or success mail from parent job

Also if one of the child job fails then the complete parent job should fail and error message should be sent

 

What i have noticed that the other parallel jobs still continue to process even if one of the jobs fails

How can i stop the complete parent job to fail if one of the subjob fails ?

 

Also need clarification on below point

1)  what is the difference between the OnSubjobError and OnComponentError from the parent job or how to use these components.

 

Attached is the sample example.

 

Thanks

Labels (2)
17 Replies
vidya821
Creator
Creator
Author

could you please check the attachment that i have shared,
Modified_sample_test_example

Not sure how does the parallel execution works then !!

 

Note: I have checked the Multi thread execution option

Anonymous
Not applicable

Oh I see. Sorry, my mistake. I should have asked you a bit more about your config. My assumption was that you were simply dropping the jobs in and expecting parallel processing. 

Anonymous
Not applicable

Anyway, going back to this question.....


But in anycase, since these child jobs belong to same parent job , is there any way to interrupt or disconnect the parent job (stop parent job execution) in case any of the child job fails


....you can tick "Exit virtual machine immediately" in the tDie's Advanced settings. But you will need to ensure that you have switched off the "Die on child error" of the job which feeds the tDie that does this.

vidya821
Creator
Creator
Author

Thanks Rhall,

Sorry, what i was thinking is like the other child job execution (Sample test 2) should stop due to error in Sample test 1, but the control should go back to the parent job and there i can send a mail with an error message.

Is this somehow possible ? (job should not be closed immediately but the control should go back to parent job with error from child jobs and i can use that error to trigger an error mail)

This could solve a big problem of mine!!

Can you also let me know if JVM option if checked will stop the whole job .
for example in the parent job if i call two jobs and i got an error in parent 1 and i used exit JVM option over there then it will stop parent 2 execution also right ?

 

Summarizing, below is the requirement

Parent jobs are running in multi thread execution

1) Parent Job 1

            1) Child Job 1-1

            2) Child Job 2-1

2) Parent Job 2

            1) Child Job 1-2

             2) Child Job 2-2

Siutation - If Child Job 1-1 fails, then the Child Job 2-1 should stop processing further and contral should return to Parent Job 1 and email should be triggered since there was an error in Child Job 1-1

For the Parent Job 2, the process should get completed with success email message.

 

 

Thanks

Anonymous
Not applicable

There is a way, but you will need to really pay attention to controlling this. For child jobs 1-1, 1-2, 2-1 and 2-2 use the mechanism I described where you connect to a tDie and terminate the JVM (tDie option). This will kill the other job within that parent job. But for Parent Jobs 1 and 2 set the "Use independent process to run subjob". That should allow your parent jobs (1 and 2) to report on what has gone wrong in your top level parent job. 

vidya821
Creator
Creator
Author

Awesome, Thanks Rhall
This worked !!
Anonymous
Not applicable

No problem. Sorry about the misunderstanding previously. I need to pay attention to the rule....

"Never assume because it makes an "ass" out of "u" and "me" 🙂

Anonymous
Not applicable

Hi @rhall,

I am not able to see the screenshots. Can you please post it again..

Thanks in advance.!