Page 1 of 1

Job sequence issue need help

Posted: Wed May 14, 2008 12:19 am
by mandyli
Hi

I would like Trigger the Job whether job status 1 or 2.

What is actual expression for this ?

Thanks
Man

Re: Job sequence issue need help

Posted: Wed May 14, 2008 12:54 am
by Yuan_Edward
mandyli wrote:Hi

I would like Trigger the Job whether job status 1 or 2.

What is actual expression for this ?

Thanks
Man
I guess it will be something like this:

JobActivity1.$JobStatus = DSJS.RUNOK Or JobActivity1.$JobStatus = DSJS.RUNWARN

JobActivity1 is the Job Activity Stage name.

Posted: Wed May 14, 2008 7:28 am
by chulett
Exactly. From a custom trigger.

Posted: Thu Jul 17, 2008 2:53 pm
by sambit
Hi All,
I have a question here on the triggers. I have a sequencer which executes 10 jobs. I want to abort my job if any of these jobs has warnings or failure. So, what should I put in triggers? Since, all the 10 links are linked to one sequencer stage which is later linked to Job Activity stage where I have the triggers. Do I have to put the triggers the following way,

JobActivity1.$JobStatus = DSJS.RUNFAILED Or JobActivity1.$JobStatus = DSJS.RUNWARN or JobActivity2.$JobStatus = DSJS.RUNFAILED Or JobActivity2.$JobStatus = DSJS.RUNWARN or JobActivity3.$JobStatus = DSJS.RUNFAILED Or JobActivity3.$JobStatus = DSJS.RUNWARN

Posted: Thu Jul 17, 2008 3:29 pm
by ray.wurlod
It's probably easier not to handle failures through triggers and emplace an Exception Handler. This has activity variables that can be used to report which activity failed and why.

Check the "automatically handle activities that fail" check box in the job sequence compilation options.

Re: Job sequence issue need help

Posted: Thu Jul 17, 2008 6:28 pm
by amarpatkar
mandyli wrote:Hi

I would like Trigger the Job whether job status 1 or 2.

What is actual expression for this ?

Thanks
Man
I would recommend the following custom trigger which has always worked for me.

JobActivity.$JobStatus = 1 OR JobActivity.$JobStatus = 2 OR JobActivity.$JobStatus = 11 OR JobActivity.$JobStatus = 12 OR JobActivity.$JobStatus = 13

Where values:
--------
1 = Finished OK
2 = Finished with warnings
11 = Validate OK
12 = Validate with warnings
13 = Validation failed

You may wish to drop a couple of these depending on what you are trying to achive.

Cheers,
Amar

Posted: Thu Jul 17, 2008 7:09 pm
by ray.wurlod
You're in trouble if "they" ever change the values, Amar. That's why the mnemonics such as DSJS.RUNOK are to be preferred.

Posted: Thu Jul 17, 2008 7:43 pm
by chulett
Which is why the original answer posted 2 months ago used the mnemonics. Never mind the fact they are much more obvious as to their intent than just the numeric values.