Job control in a sequencer
Moderators: chulett, rschirm, roy
Job control in a sequencer
I have a sequencer with a few jobs in it. What I want is Job1 should trigger Job2 when Job1 is either successful or has warnings. Job1 should not trigger Job2 only when Job1 fails.
Job1 --------------> Job2 ------------------->
|
triggers Job2 when Job1 is successful or has warnings
I will appreciate any ideas or help to accomplish this.
Thanks.
Job1 --------------> Job2 ------------------->
|
triggers Job2 when Job1 is successful or has warnings
I will appreciate any ideas or help to accomplish this.
Thanks.
You need to use a Custom trigger to handle this. For Ran Ok and Warnings, use something like this in the trigger to Job2:
Note that 'Job1' in the above trigger code is actually the Job Activity stage name that runs Job1.
I'd suggest using an 'Otherwise' trigger to handle the 'not ok' part of this sequence, rather than specifically checking for Aborted.
Code: Select all
Job1.$JobStatus = 1 Or Job1.$JobStatus = 2
I'd suggest using an 'Otherwise' trigger to handle the 'not ok' part of this sequence, rather than specifically checking for Aborted.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Got confused with your requirement and diagram.
If you want to apply a constraint of "do not perform job2 if job1 fails", then all you need to do is to grab a link to a dummy action and insert the condition of fails to it and use 'otherwise' constraint for the job2 link.
If you want to call job2 on success or warn or job1, then you can have 2 links - one for success and one for warn - and both having job2 at its head, which then leads to a sequence stage with 'any' option.
You can carry forward from the sequence step.
If you want to apply a constraint of "do not perform job2 if job1 fails", then all you need to do is to grab a link to a dummy action and insert the condition of fails to it and use 'otherwise' constraint for the job2 link.
If you want to call job2 on success or warn or job1, then you can have 2 links - one for success and one for warn - and both having job2 at its head, which then leads to a sequence stage with 'any' option.
You can carry forward from the sequence step.
Craig, thank you for the help. I have another question though not directly related to my first posting. In the same sequencer where I have 3 jobs, if the first one or the second one aborts, the sequencer still continues execution of the subsequent jobs. My understanding is that the sequencer should be able to trap this job level error and act accordingly. Can you please educate me what actually happens here.chulett wrote:You need to use a Custom trigger to handle this. For Ran Ok and Warnings, use something like this in the trigger to Job2:
Note that 'Job1' in the above trigger code is actually the Job Activity stage name that runs Job1.Code: Select all
Job1.$JobStatus = 1 Or Job1.$JobStatus = 2
I'd suggest using an 'Otherwise' trigger to handle the 'not ok' part of this sequence, rather than specifically checking for Aborted.
Thanks.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In versions earlier than 7.5, your Exception Handler can trigger a Routine Activity that calls UtilityAbortToLog, which will abort the entire job sequence.
It's not a technique that I like (I prefer to create jobs that don't abort), but it works.
It's not a technique that I like (I prefer to create jobs that don't abort), but it works.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom