I have a sequence that contains several jobs (> 25). When any one of the job aborts, I need to send an email and abort the sequence. The only way by which I know how to do this is to attach a Notification Activity and Terminator to EACH of the jobs in the sequence. This is cumbersome and makes the sequence unreadable.
Is there a better way of doing this? I have tried the following
1. I created a separate sequence (I will call this sub-sequence) that contains a Notification Activity and Terminator (in that order) thinking that I could call this sub-sequence from each of the jobs in the main sequence (this would still be cumbersome but at least I will need to call one sub-sequence from each job in the main sequence rather than calling both Notification Activity and Terminator from each job in the main sequence). The new sub-sequence I created did not compile because it was expecting an input to the Notification Activity within that sequence
2. I added one Notification Activity and Terminator combination in the main sequence with the hope that I could attach more than one job to this combination. This did not work as well because multiple inputs could not be attached to a single Notification Activity
Currently I am using the trigger "Unconditional" to pass from one job to the next within the main sequence. For passing the control to Notification Activity and Terminator I am using the trigger "Failed Conditional"
I have already looked through the posts and did not find any messages which surprises me because I am thinking that I am definitely missing something.
Could you guys help out?
Thanks,
Writing generalized subroutine for sending emails
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 67
- Joined: Thu Aug 09, 2007 7:51 pm
Welcome Aboard!
You can drop in an Exception Activity.
If there is any exception, i.e. if any of your jobs fail, the control goes to the Exception Activity.
Now connect a Notification activity and a terminator to the Exception Activity.
This way you dont clutter up the sequence.
HTH
You can drop in an Exception Activity.
If there is any exception, i.e. if any of your jobs fail, the control goes to the Exception Activity.
Now connect a Notification activity and a terminator to the Exception Activity.
This way you dont clutter up the sequence.
HTH
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
-
- Premium Member
- Posts: 457
- Joined: Tue Sep 25, 2007 4:05 pm
Hi,narasimha wrote:Welcome Aboard!
You can drop in an Exception Activity.
If there is any exception, i.e. if any of your jobs fail, the control goes to the Exception Activity.
Now connect a Notification activity and a terminator to the Exception Activity.
This way you dont clutter up the sequence.
HTH
How about including the generic DSSendMail routine in the job control of each job? If the WaitforJob() returns an errorcode > 0 then the DSSendMail routine gets kicked off.
I think it is also a viable option along with the above solution!
Let me know if I am wrong!
Vivek Gadwal
Experience is what you get when you didn't get what you wanted
Experience is what you get when you didn't get what you wanted
It can be coded, but I guess it is an overkill.vivekgadwal wrote: Hi,
How about including the generic DSSendMail routine in the job control of each job? If the WaitforJob() returns an errorcode > 0 then the DSSendMail routine gets kicked off.
I think it is also a viable option along with the above solution!
Let me know if I am wrong!
Prior to Version 7.x, you did not have the luxury of using the Exception Activity. Why do you want to take a step back and code it.
YMMV
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
-
- Premium Member
- Posts: 457
- Joined: Tue Sep 25, 2007 4:05 pm
Well, you are right. I am working on 7.0 right now and I am thinking in that terms!narasimha wrote:It can be coded, but I guess it is an overkill.vivekgadwal wrote: Hi,
How about including the generic DSSendMail routine in the job control of each job? If the WaitforJob() returns an errorcode > 0 then the DSSendMail routine gets kicked off.
I think it is also a viable option along with the above solution!
Let me know if I am wrong!
Prior to Version 7.x, you did not have the luxury of using the Exception Activity. Why do you want to take a step back and code it.
YMMV
Vivek Gadwal
Experience is what you get when you didn't get what you wanted
Experience is what you get when you didn't get what you wanted
-
- Premium Member
- Posts: 67
- Joined: Thu Aug 09, 2007 7:51 pm
[quote="narasimha"]Welcome Aboard!
You can drop in an Exception Activity.
If there is any exception, i.e. if any of your jobs fail, the control goes to the Exception Activity.
Now connect a Notification activity and a terminator to the Exception Activity.
This way you dont clutter up the sequence.
HTH[/quote]
Thanks Narasimha. That solved the problem. I appreciate your help very much.
You can drop in an Exception Activity.
If there is any exception, i.e. if any of your jobs fail, the control goes to the Exception Activity.
Now connect a Notification activity and a terminator to the Exception Activity.
This way you dont clutter up the sequence.
HTH[/quote]
Thanks Narasimha. That solved the problem. I appreciate your help very much.
-
- Premium Member
- Posts: 67
- Joined: Thu Aug 09, 2007 7:51 pm
[quote="narasimha"]Welcome Aboard!
You can drop in an Exception Activity.
If there is any exception, i.e. if any of your jobs fail, the control goes to the Exception Activity.
Now connect a Notification activity and a terminator to the Exception Activity.
This way you dont clutter up the sequence.
HTH[/quote]
Thanks Narasimha. That solved the problem. I appreciate your help very much.
You can drop in an Exception Activity.
If there is any exception, i.e. if any of your jobs fail, the control goes to the Exception Activity.
Now connect a Notification activity and a terminator to the Exception Activity.
This way you dont clutter up the sequence.
HTH[/quote]
Thanks Narasimha. That solved the problem. I appreciate your help very much.