Page 1 of 1

Aborting Sequence if job finshed with warnings

Posted: Fri May 07, 2010 4:31 am
by suman27
Hi,

We are using an ' exception handler' stage in the sequencer to capture the job status. We want to abort the sequence if job finished with warnings or job is aborted.
Exception handler is working if job is aborted but not working if job is finished with warnings,

All job triggers in the sequence are 'OK-Conditional'.
checked the fallowing options
automatically handles the activities that fail.
log warnings after activities that finish with status other then ok.

We tried running the sequence by selecting limits/abort job after/ as 1, but no use

Regards,
Suman.

Aborting Sequence if job finshed with warnings

Posted: Fri May 07, 2010 5:24 am
by ajay.vaidyanathan
Hi,
There are already few posts on the same context. Please search it in the forum.

Try Having "Custom Conditional" Trigger and check the JobStatus = 'Finished Ok' for SUCCESS Else GoTo Failure Link

Posted: Fri May 07, 2010 5:54 am
by ray.wurlod
Exception Handler is only triggered by a failure, not by a warning.

If you want to manage warnings, you need explicit triggers.

Posted: Fri May 07, 2010 7:33 am
by suman27
ray.wurlod wrote:Exception Handler is only triggered by a failure, not by a warning.

If you want to manage warnings, you need explicit triggers. ...
Thanks ray,
Could you suggest any alternatives for this situation.
How to abort job if there are any warnings.
We have to use exception handler as there are many jobs(30) in one sequence. and we have many such sequences in project.
Dragging a failure trigger(link) from each job(job activity) is going to be a mess.

Regards,
Suman.

Posted: Fri May 07, 2010 7:49 am
by priyadarshikunal
then there is not many options left for you.

either abort the sequence on 1 warning by setting the warning limit or insert a after job subroutine in each job to raise exception if the INTRIM JOB STATUS is not equal to 1.

Posted: Fri May 07, 2010 7:55 am
by chulett
Another option would be to build a custom routine that scans the current job log for warnings and aborts the Sequence if it finds any.

Posted: Fri May 07, 2010 8:08 am
by suman27
priyadarshikunal wrote:then there is not many options left for you.

either abort the sequence on 1 warning by setting the warning limit or insert a after job subroutine in each job to raise exception if the INTRIM JOB STATUS is not equal to 1.

Hi Priyadarshikunal,
I tried setting that limit to 1, but still job is not getting aborted. It will still finish with warning but in the log there will be a fetal error 'Issuing abort after 1st warnings logged'

Regards,
Suman.

Posted: Fri May 07, 2010 9:56 am
by suman27
chulett wrote:Another option would be to build a custom routine that scans the current job log for warnings and aborts the Sequence if it finds any. ...
Hi chulett,
Thanks for your suggestion.
This option will not work for me,because before the routine finds warnings in job and trigger abort for the sequence , there is a chance that next job will start running.
my requirement is restricting all other jobs as soon as any job got warnings,

any other advices are welcome.

Regards,
Suman.

Posted: Fri May 07, 2010 10:32 am
by chulett
That wasn't clear from anything you've posted so far. Then, as noted, mess or not you'll need explicit triggers.

Posted: Mon May 10, 2010 11:14 am
by priyadarshikunal
Have you tried anything posted so far?

1. You need to check "Log warning in case any activity finishes other that ok" (or something like that) in sequence properties so that the sequence gets aborted too.

2. Custom routine called as after job subroutine of each job will raise an exception and exception handler should catch that and then you can abort the sequence using terminator. You need OK triggers so that i doesn't start the next job or looses the check point.

3. Or scan through the job logs to find the warning before you raise an exception.