Hi,
We have a sequence in which 50 jobs will run one after the other. Please let me know can how to add a Notification Activity stage in this sequence so whenever one of the job fails I have to get a mail.
Regarding Mail Notification Activity
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 38
- Joined: Tue Jan 10, 2006 1:25 am
Regarding Mail Notification Activity
Thanks & Regards,
Zabi
Zabi
The question you put across is 'whenever one of the job fails'. You may want to be more specific. For example, what if the job did not fail, but had warnings. Also, how would you want the other jobs handled if one of them failed, should the entire sequence be aborted or only the job that failed should be aborted, etc, etc.
Now, lets assume a case where a job sequence has 3 job activities and -
i) All of them should execute successfully for the sequence also to be )successful, and hence send a success e-mail.
ii) If any of them, either generate a warning or fail, then downstream jobs should not execute and the sequence should abort.
In such a scenario-
1. Drop a sequencer stage on your canvas, and set it to ANY mode.
2. Connect the job activities sequentially, that is job1--> job2--> job3.
3. Connect job3 to the Notification stage (for success).
4. Set the Trigger to these links to "Conditional OK" (Executed OK).
5. Draw a second link from each job activity and connect it to the Sequencer stage.
6. Set the Trigger of these to "Otherwise" - meaning, if they finish with the status warning or fail.
7. Add a notification stage in the outlink of Sequencer (for failure notification).
8. Now, add a Routine to the outlink of notification stage. The routine should accepts jobname as the argument and forces an abort of the job.
You are ready to go. However, this design would used only in the case of ALL or NOTHING design. It may be modified to handle other issues.
Hope this helps
.
gateleys
Now, lets assume a case where a job sequence has 3 job activities and -
i) All of them should execute successfully for the sequence also to be )successful, and hence send a success e-mail.
ii) If any of them, either generate a warning or fail, then downstream jobs should not execute and the sequence should abort.
In such a scenario-
1. Drop a sequencer stage on your canvas, and set it to ANY mode.
2. Connect the job activities sequentially, that is job1--> job2--> job3.
3. Connect job3 to the Notification stage (for success).
4. Set the Trigger to these links to "Conditional OK" (Executed OK).
5. Draw a second link from each job activity and connect it to the Sequencer stage.
6. Set the Trigger of these to "Otherwise" - meaning, if they finish with the status warning or fail.
7. Add a notification stage in the outlink of Sequencer (for failure notification).
8. Now, add a Routine to the outlink of notification stage. The routine should accepts jobname as the argument and forces an abort of the job.
Code: Select all
Call DSLogFail(JobName, 'Job Failed')
Ans=''
Hope this helps
![Laughing :lol:](./images/smilies/icon_lol.gif)
gateleys
-
- Participant
- Posts: 38
- Joined: Tue Jan 10, 2006 1:25 am
The logic works in a way that if ANY of the jobs fail, then the sequence aborts. So, it is irrespective of which job failed, and hence the name is inconsequential. However, on the good side, if you include the job report in the notification stage, it will contain which job failed. Works with DS7.0.Zabeerulla wrote:Thanks to All
Gateleys, this is working fine. Can I get the name of the job also which has been failed in the sequence.
gateleys