Page 1 of 1

Abort a Job Manually

Posted: Thu Jun 29, 2006 2:47 am
by kishleo
Hi Guys,
i want to fail my job based on my condition, may i know how to force a job to fail. i need to force it to fail because my job sequence depending on this job. so i should return something from this job back to my sequence so that i can have 2 pipelines.
hope you got my question.

Posted: Thu Jun 29, 2006 2:56 am
by ray.wurlod
Welcome aboard. :D

If you are writing your own code, involve the DSLogFatal() function. From a Job Sequence use a Routine activity that calls UtilityAbortToLog().

Each of these has a side effect of aborting the job.

I disagree completely with the practice of aborting jobs, but the information above is how to achieve it.

I believe that the master job control should retain complete control, under all circumstances.

Posted: Thu Jun 29, 2006 3:01 am
by sb_akarmarkar
You can also use terminator activity or exception handler...

Thanks,
Anupam

Posted: Thu Jun 29, 2006 6:27 am
by ray.wurlod
An Exception Handler does not cause an abort.

A Terminator activity sends a stop request to all running job, so that their status will end up being "Stopped" rather than "Aborted".

Thus neither suggestion is correct. Neither approach will abort a job.

Posted: Thu Jun 29, 2006 6:30 am
by sb_akarmarkar
ray.wurlod wrote:An Exception Handler does not cause an abort.

A Terminator activity sends a stop request to all running job, so that their status will end up being "Stopped" rather than "Aborted".

Thus neither ...
Exception Handler + UtilityAbortToLog() routine


Thanks,
Anupam

Posted: Thu Jun 29, 2006 10:35 am
by kumar_s
Exception handler will get the control only when the job gets aborted. There wont be any use of UtilityAbortToLog () then.
If you need to abort within in the same job, you have another ugly approach to marking 'bortAfter n rows' in transformer.