Exceptional handler activity understanding

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Exceptional handler activity understanding

Post by vamsi.4a6 »

I need to trigger the email notification when any one of the job in sequence is aborted
Design1:

Job1,Job2 and Job3 are connected by conditional-ok trigger

Job1-->Job2-->Job3


Exceptionalhandler-->emailnotificationactivity-->terminator

Understanding:In this design we do not have this combination( OK trigger and an otherwise trigger),so
so code will be inserted by Datastage. Exceptionalhandler will be triggered if any job is aborted

Design2:

Job1,Job2 and Job3 are connected by conditional-ok trigger.
One more output link from each activity will go to sequencer with trigger as otherwise

Job1-->Job2-->Job3---sequencer(all)-->terminator


Exceptionalhandler-->emailnotificationactivity-->terminator

Understanding:In this design we have OK trigger and an otherwise trigger,so
so no code will be inserted by Datastage Exceptionalhandler will not be triggered

Please check whether understanding is correct or not?
Thanks and Regards
Vamsi krishna.v
http://datastage-vamsi.blogspot.in/
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

Your understanding is correct. Exception Handler is triggered by failure of an activity with no explicit failure handling. Please also see this link.
ssnegi
Participant
Posts: 138
Joined: Thu Nov 15, 2007 4:17 am
Location: Sydney, Australia

Reply

Post by ssnegi »

Code: Select all

Job1-->Job2-->Job3---sequencer(all)-->terminator 
change this to

Code: Select all

Job1-->Job2-->Job3---sequencer(Any)--> Notification --> terminator 
Since the sequencer is coming from the otherwise link it will be used only if any job finishes with status other than ok.
This will ensure that if any of the jobs fail it will abort the sequence. This also takes care of job that finish with warnings that wont be picked up by the Exception Handler stage.
Then the notification stage will send the email and the job will terminate.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Note that (in spite of what the illustration seems to show) there are links from all three jobs to the Sequencer, hence the need to set it to Any for it to work properly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply