Page 1 of 1

How to run jobs in a sequencer based on input value

Posted: Mon Mar 28, 2005 10:40 am
by SonShe
I have a sequencer with a few jobs in it. The jobs are not dependant on each other. I would like to run only some of the jobs in the sequencer. For example, out of jobs A, B, C, and D I want only A and C to run based on the input parameter value. Can I do something like this? If so, I would appreciate for any idea or help.

Thanks in advance.

Posted: Mon Mar 28, 2005 10:49 am
by roy
Hi,
the starting point should be a nested condition stage having triggers that start the job asctivities depending on the conditions you mention.

IHTH,

Posted: Tue Mar 29, 2005 6:18 pm
by SonShe
roy wrote:Hi,
the starting point should be a nested condition stage having triggers that start the job asctivities depending on the conditions you mention.

IHTH,
Thanks for the reply. I could develop using nested condition and control running of the independent jobs.

However if I have two jobs - the first one triggers the second job when the first one completes successfully. In this situation if the second one aborts, then I would like to run only the second one. If the first one fails I want to run both. Can I use the same nested condition trick? If so, how do I do that?

I will appreciate any help.

Thanks

Posted: Wed Mar 30, 2005 2:13 am
by roy
hmm, version 6 still doesn't have restartable fomr fialour point capabilities so you might need to use control job to get it done.

IHTH,

Posted: Wed Mar 30, 2005 6:07 pm
by vmcburney
You could have a flag for each job set to Y or N. You have a nested condition that has four links, three links go straight to jobs A, C and D. The second trigger goes to a sequencer stage set ANY. Job A has a link to this same sequencer stage. The three direct links have a trigger of FLAGA='Y'
FLAGC='Y'
FLAGD='Y'

Code: Select all

       condition stage
     /    |     |    \
joba --- seq     jobc  jobd
          |
        jobb
The 2nd trigger has
FLAGA='N' and FLAGB='Y'
Job A needs a double trigger, continue if JOBA status is OK and FLAGB='Y'. If you don't want to code a double trigger you can put a condition stage between JOBA and the sequencer stage which is set to FLAGB='Y'.

So when you run the job you set all flags to Y. When you restart after a failure you can choose any combination of flags you want. If you set FLAGA to N it will go down the other sequencer route.