Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10116

Re: CONTINUE OR STOP ON CHAINS

$
0
0

Lets call

step 1 chain A

step 2 chain B

step 3 chain C.

 

All these three steps are within one big chain called Mega_Chain.

 

I assume that you don't want to run B, if any one job fails in A.

But all 10 jobs in A should complete no matter what.

 

There are two solutions i can think of 

 

Solution 1:

  1. Remove the chain A from Mega_Chain.
  2. Create 2 events :
    • JOB_FAILED_IN_A
    • GREEN_LIGHT_B_C
  3. Now edit each job in A to raise the event JOB_FAILED_IN_A in case of status error.
  4. Edit the Mega_Chain  to wait for event GREEN_LIGHT_B_C.
  5. Raise the event GREEN_LIGHT_B_C manually.
  6. Create a Job chain with step 1, call it STOP_MEGA_CHAIN, add the System_Raise_Event job definition and add the following parameters of the job.
    • Event - GREEN_LIGHT_B_C
    • Raise or Clear - Clear
  7. Now go to wait events tab of STOP_MEGA_CHAIN, add the event JOB_FAILED_IN_A and Auto - submit - always.

 

Now go on with your regular schedule, (you will have to decide when to run Mega_chain, as it now contains only B and C).

 

Solution 2:

  1. Create 10 events, each one for each job in A.
  2. If job 1 completes in A(step 1), raise event A, if job 2 completes, raise event 2... until job 10.
  3. Make the Step 2 - Chain B to wait for all 10 events.
  4. Open the chain A, and edit the status handlers of each of the 10 steps, to continue on cancelled, error, killed, completed, otherwise, unknown.

Now go on with your schedule. Chain A(Step 1) will run all 10 jobs no matter what, but Chain B(Step 2) will not start, even if one job fails in A.

 

Thanks

Nanda


Viewing all articles
Browse latest Browse all 10116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>