Hi guys,
Here is my current situation. I have a master sequencer(mas_seq) that will run another sequencer(Seq_stage_load). Seq_stage_load has 20 job activities(stage_job_1, stage_job_2, etc.) that will each run a parallel job. If the parallel job fails, the job activity triggers a failure notification. The Seq_stage_load sequencer triggers a success notification when it completes.
Here is the issue, regardless if the job activities fail or complete, the Seq_stage_load will send out a success email once all the job activities ran.
Goal:
I want the "Success" notification, only if all 20 job activities complete successfully. If any job activities fail, I want to trigger a notification that notifies me some job activities failed.
What are some simple ways to achieve this?
Thanks.
custom trigger for Sequence Job when child jobs fail
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 33
- Joined: Tue Sep 02, 2014 7:43 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Run Success triggers from all activities to an "All" sequencer.
Run Otherwise triggers from all activities to an "Any" sequencer.
Create a Notification activity downstream of each.
Run Otherwise triggers from all activities to an "Any" sequencer.
Create a Notification activity downstream of each.
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.
-
- Premium Member
- Posts: 33
- Joined: Tue Sep 02, 2014 7:43 am
No, he means have one Success notification and one Failure notification. Before each one put a Sequencer - set it to All for the Success email and Any for the Failure email. Then run two triggers from each stage, one to each, as noted.
Another option is for the Success triggers to go from Job Activity to Job Activity with the last success trigger going to the Success email. This if the jobs run in a serial fashion and you want the series to stop at the first failure. The previous design allows all jobs to run regardless of the success or failure of any of the individual jobs.
Now, if you want the master sequence to send out the success notification, you'll need to ensure that any failure in the child Sequence is propagated up to the master - meaning the child sequence must abort when there is a job failure. Use a Terminator for that. It will prevent the master from sending out an inappropriate success email (assuming you have your trigger set up correctly).
Another option is for the Success triggers to go from Job Activity to Job Activity with the last success trigger going to the Success email. This if the jobs run in a serial fashion and you want the series to stop at the first failure. The previous design allows all jobs to run regardless of the success or failure of any of the individual jobs.
Now, if you want the master sequence to send out the success notification, you'll need to ensure that any failure in the child Sequence is propagated up to the master - meaning the child sequence must abort when there is a job failure. Use a Terminator for that. It will prevent the master from sending out an inappropriate success email (assuming you have your trigger set up correctly).
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 33
- Joined: Tue Sep 02, 2014 7:43 am
Re: custom trigger for Sequence Job when child jobs fail
For Success :Link to all actvities to sequencer activity and set trigger condition conditional ok and set in the sequencer activty option as All and connect to notification activity.
For Failure :Link to all actvities to sequencer activity and set trigger condition Failed and set in the sequencer activty option as Any and connect to notification activity.
Best Regards,
Bhargav
For Failure :Link to all actvities to sequencer activity and set trigger condition Failed and set in the sequencer activty option as Any and connect to notification activity.
Best Regards,
Bhargav
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Actually it's sufficient that the sequences log a warning when any activity finishes with a status other than OK. That propagates the problem up to the master sequence (without the need to force jobs to abort) at which point logs can be inspected to detect what the actual problem is. But to resolve the "all success" question, that approach will suffice.
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.