Page 1 of 1

Job aborted in sequence but did not trigger Exception

Posted: Wed May 14, 2008 10:36 am
by RodBarnes
I have a sequence that has the "Automatically handle activities that fail" option set and includes an Exception stage to catch them. It has a couple job stages 'A' and 'B' with OK triggers feeding a sequencer (set to "All") and the sequencer feeds another job stage 'C' that ends the sequence.

This morning, job 'B' succeeded but job 'A' failed due to a connection error. Though 'A' failed, it did not fire the Exception stage. Just after logging the failure of 'A', the next entry in the log for the sequence is the "Sequencer ... was entered but never exited".

Is the fact that it was sitting in the sequencer, waiting for job 'A' to finish, the reason it didn't fire off the Exception stage? I would've expected the error from 'A' to fire the exception regardless of any other activity in the sequence.

Posted: Thu May 15, 2008 12:18 am
by balajisr
Try placing a execute command activity with a simple command like

Code: Select all

echo 'job aborted'
to verify whether the exception handler is called or not.[/quote]

Posted: Thu May 15, 2008 7:09 am
by chulett
Each Sequence stage has a 'Logging Text' property. Use that to leave clues about which stages are actually getting executed.

Posted: Thu May 15, 2008 10:18 am
by RodBarnes
When an exception stage is triggered, it is reported in the log as:

Code: Select all

"<controlling_stage>.JobControl (@<error_stage>): Will execute error activity: <exception_stage>"
For example:

Code: Select all

"seqUpdatePatches.JobControl (@ImportPatch): Will execute error activity: Exception"
On a typical run, if there is an error, I see this entry and can confirm that the exception was fired. In this instance, no log entry was present to confirm it happened.

Posted: Thu May 15, 2008 10:19 am
by RodBarnes
I have the "Log warnings after activities that finish with status other than OK" enabled on all my jobs for this purpose. I do use the "Logging text" ability in particular cases.
chulett wrote:Each Sequence stage has a 'Logging Text' property. Use that to leave clues about which stages are actually getting executed.

Posted: Fri May 16, 2008 5:40 am
by ray.wurlod
Does Job A have a specific Failure trigger? This would be used in preference to the Exception Handler in the event of an abort of job A.

Posted: Fri May 16, 2008 9:26 am
by RodBarnes
No, all jobs in this sequence have only OK triggers. The exception stage is intended to catch everything else. From your responses, I gather that you agree the exception stage should have been triggered?
ray.wurlod wrote:Does Job A have a specific Failure trigger? This would be used in preference to the Exception Handler in the event of an abort of job A.