Page 1 of 1

Design question on handling exceptions

Posted: Tue Dec 06, 2011 2:44 am
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

Posted: Tue Dec 06, 2011 4:54 am
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

Posted: Tue Dec 06, 2011 2:45 pm
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.

Posted: Wed Dec 07, 2011 10:29 pm
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.

Posted: Wed Dec 07, 2011 10:31 pm
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.

Posted: Wed Dec 07, 2011 11:47 pm
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!

Posted: Thu Dec 08, 2011 3:35 am
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