Design question on handling exceptions

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
srilaxmi
Participant
Posts: 22
Joined: Thu Feb 28, 2008 5:21 am

Design question on handling exceptions

Post by srilaxmi »

Hi,

I have design requirement to code a sequncer where in I need to execute a Routine if any Job in that sequencer aborts.

below is the job design I have build:

Code: Select all

JA1 -> JA2 -> JA3(if abort) -> EmailNotification
              
Exceptional Handler -> RoutineActivity -> TerminatorStage
My intension is to run the RoutineActivity if any of the above 3 job acitvity stages aborts.


When JA1 and JA2 aborts, RoutineActivity is triggered but when JA3 aborts only EmailNotification is called but not RoutineActivity.


I have set "Automatically handle Activities that fail" property in sequencer. Please let me know if I need to set any other properties to make this work.

Also let me know if you have any alternate solution for this design requirement.

Thanks,
Sri
Sri
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

From what i recollect.....

if you have specified what has to be done is an activity fails/aborts it will not Automatically handle the aborted job despite you marking the option "Automatically handle Activities that fail"

For your case if JA3 aborts you are running the email notification hence it is skipping the part placed under Exceptional Handler. Try removing the Email notification and place it after routine Activity and post the result
- Zulfi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Explicit Failure triggers take precedence over Exception Handler or other automatic handling of activities that fail. Since JA3 has an explicit Failure trigger it can not invoke the Exception Handler. You need a separate Routine activity - even if it calls the same routine - downstream of the Failure trigger.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srilaxmi
Participant
Posts: 22
Joined: Thu Feb 28, 2008 5:21 am

Post by srilaxmi »

If I remove Abort flow(Email notification), exceptional handler is triggering when JA3 aborts.

But my requirement is to execute both Email notification and routine in exceptional handler if JA3 aborts.

Please suggest. Thanks.
Sri
srilaxmi
Participant
Posts: 22
Joined: Thu Feb 28, 2008 5:21 am

Post by srilaxmi »

If I remove Abort flow(Email notification), exceptional handler is triggering when JA3 aborts.

But my requirement is to execute both Email notification and routine in exceptional handler if JA3 aborts.

Please suggest. Thanks.
Sri
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I did. Please read my complete post.

Premium membership is not expensive (less than 30c (Rs12) per day) and is well worth having!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

srilaxmi wrote:my requirement is to execute both Email notification and routine in exceptional handler if JA3 aborts.
Place the email Activity at the end of exceptiion handler flow with a trigger using the variable stage_label.$ErrSource which should point to JA3
- Zulfi
Post Reply