Writing generalized subroutine for sending emails
Posted: Fri Oct 26, 2007 12:40 pm
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,
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,