Page 1 of 2

Job Sequence completed successful even a job aborted status

Posted: Mon Sep 11, 2006 11:58 am
by nekkalapudi
Hi,

Created a sequence to run couple of jobs.
While running one of the job aborted, but
Seq_BILLOMAT..JobControl (@Coordinator): Summary of sequence run
15:43:26: Sequence started (checkpointing on)
15:43:26: Setup_BILLOMAT (JOB Setup_BILLOMAT_Source_Extract) started
15:43:50: Setup_BILLOMAT (JOB Setup_BILLOMAT_Source_Extract) finished, status=2 [Finished with warnings]
15:43:50: Process_BILLOMAT (JOB Process_BILLOMAT_Final) started
15:43:52: Process_BILLOMAT (JOB Process_BILLOMAT_Final) finished, status=3 [Aborted]
15:43:52: notify_Process_BILLOMAT_failure (ROUTINE DSSendMail) started
15:43:52: notify_Process_BILLOMAT_failure finished, reply=-21
15:43:52: Sequence finished OK
and removed the check points.
One more thing is the aborted job is displayed as warning in the log.

My doubts is why the sequence completed successfully even one of the jobs aborted and why the log is showing as warning.

any help is greatly appreciated.

Thanks,
Omkar

Posted: Mon Sep 11, 2006 12:03 pm
by DSguru2B
Go to the job properties of the sequence job and check out the job properties. You must have checked the "Automatically handle jobs that fail". Thats why the job is finishing rather than aborting.

Posted: Mon Sep 11, 2006 12:04 pm
by Krazykoolrohit
Or you would have set the trigger in job property inside sequencer as "unconditional"

Posted: Mon Sep 11, 2006 12:18 pm
by nekkalapudi
DSguru2B wrote:Go to the job properties of the sequence job and check out the job properties. You must have checked the "Automatically handle jobs that fail". Thats why the job is finishing rather than aborting.
I checked Add Checkpoint so sequence is restartable on failure and Log Warnings after activities that finish with status other than OK only.

Posted: Mon Sep 11, 2006 12:19 pm
by nekkalapudi
Krazykoolrohit wrote:Or you would have set the trigger in job property inside sequencer as "unconditional"
Tirgger used custom conditional. Checking job status.

Posted: Mon Sep 11, 2006 12:45 pm
by Krazykoolrohit
Can you please post the sequence flow.

Posted: Mon Sep 11, 2006 12:58 pm
by nekkalapudi
Krazykoolrohit wrote:Can you please post the sequence flow.
I didn't get exactly what you are asking. Any way
I have three jobs, in the job sequence added three job activity stages and added mail notifications to each job activity sends mail if the job aborts.
As I stated earlier for trigger used custom conditional, validating Job status and for job seq properties checked Add check point and Log warninig after job activity. If I am wrong please let me know.

Thnaks,

Posted: Mon Sep 11, 2006 1:10 pm
by meena
Hi,

The Sequencer shows you that it is finished successfully even after a job abort because the sequencer is able to send the email notification.You have triggers for the job activity stage: one for success of the job as to go to next job and second if the job aborted then send a email notification. Here in your sequencer the job aborted but it is able send the email notification successfully so the sequencer finished with success.
My doubts is why the sequence completed successfully even one of the jobs aborted and why the log is showing as warning.

Posted: Mon Sep 11, 2006 1:20 pm
by nekkalapudi
meena wrote:Hi,

The Sequencer shows you that it is finished successfully even after a job abort because the sequencer is able to send the email notification.You have triggers for the job activity stage: one for success of the job as to go to next job and second if the job aborted then send a email notification. Here in your sequencer the job aborted but it is able send the email notification successfully so the sequencer finished with success.
My doubts is why the sequence completed successfully even one of the jobs aborted and why the log is showing as warning.
Mail was not sent successfully, following is the error:
Seq_BILLOMAT..JobControl (@notify_Process_BILLOMAT_failure): Routine DSSendMail did not finish OK, return code = '-21'

Thanks,

Posted: Mon Sep 11, 2006 1:29 pm
by NBALA
Hi,

Check the Mail properties like SMTP mail server and From & To mail addresses (some mailserver could not mail thru internet like to your yahoo id).

And verify the triggers, you can use triggers for each link or you can use the custom trigger. If you use custom - check how many conditions you have. If you have only one condition then the event will be triggered for that condtion, use 'or' operator if you want to trigger an event for any of the condition.

Provide more details on the triggers used.

-NB

Posted: Mon Sep 11, 2006 1:44 pm
by thumsup9
You seem to have used Expression Type as Custom - Conditional. Can you please post the Expression you used.

Posted: Mon Sep 11, 2006 1:52 pm
by nekkalapudi
thumsup9 wrote:You seem to have used Expression Type as Custom - Conditional. Can you please post the Expression you used.
Custom trigger expression: -
Process_BILLOMAT.$JobStatus = 2 or Process_BILLOMAT.$JobStatus = 1

Thanks,

Posted: Mon Sep 11, 2006 1:56 pm
by nekkalapudi
NBALA wrote:Hi,

Check the Mail properties like SMTP mail server and From & To mail addresses (some mailserver could not mail thru internet like to your yahoo id).

And verify the triggers, you can use triggers for each link or you can use the custom trigger. If you use custom - check how many conditions you have. If you have only one condition then the event will be triggered for that condtion, use 'or' operator if you want to trigger an event for any of the condition.

Provide more details on the triggers used.

-NB
For each Job activity used two links. 1) On success go th next stage. Used custom Trigger. 2) Failed link used to send mail.

Thanks,

Posted: Mon Sep 11, 2006 2:04 pm
by kris007
That explains things. Since you have used a failure trigger, the Job sequence reads it as you are handling the failure activities. So, as per the Job sequence, when the job aborts it sends an email and its job is done and hence the successful message. If you want the sequence to abort when a job fails, place a Terminator activity or UtilityAbortToLog routine stage after the Notification stage and that will give you what you want.

Posted: Mon Sep 11, 2006 2:15 pm
by thumsup9
nekkalapudi wrote:
thumsup9 wrote:You seem to have used Expression Type as Custom - Conditional. Can you please post the Expression you used.
Custom trigger expression: -
Process_BILLOMAT.$JobStatus = 2 or Process_BILLOMAT.$JobStatus = 1

Thanks,
One way to do this is if Process_BILLOMAT.$JobStatus <> DSJS.RUNOK then send this to Notification Activity and then to a Routine Activity. You can call a routine like below in your routine activity and that should abort the sequencer if the job status is other than OK.

Function rtFatalError(Arg1)

Call DSLogFatal("one or more jobs failed", Arg1)
Ans = 1

just a drop in an ocean of ideas...