Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
When you want to let an order wait until an order in another job chain has passed successfully a specific node, you can use the sync job. Here are some use cases:1.
- two or more job chains.
...
- In every job chain is one order. The order can proceed, when they are all on a specific node in their chain.
...
- Like 1. but now, you want to wait for more than one order.
...
- You have job chains A,B,C. C can start, when A or B are finished.
1. two or more job chains. One order in every job chain. The order can proceed, when they are all on a specific node in their chain.
- create a job "SynchroniseJobChains" named "SynchronizeJobChainssync" with using the job wizzard in Joe.
...
- wizard in JOE.
Code Block |
---|
<job title="Synchronize Job Chains" order="yes">
<script language="java"
java_class="sos.scheduler.job.JobSchedulerSynchronizeJobChains"/>
</job>
|
- create a node before the node, you want to wait. Assign the just created job to this node
- create a node after the node, you want to wait for. Assign the just created job to this node
<?xml versioh1. "1.0" encoding"ISO-8859-1"?>
Code Block |
---|
<job_chain>
<job_chain_node state="100"
job="jobsSample_1"
next_state="sync"
error_state="error"/>
<job_chain_node state="sync"
job="Sync"
next_state="200"
error_state="error"/>
<job_chain_node state="200"
job="jobsSample_3"
next_state="success"/>
<job_chain_node state="success"/>
<job_chain_node state="error"/>
</job_chain>
|
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?> <job_chain> <job_chain_node state="100" job="jobsSample_2" next_state="sync" error_state="error"/> <job_chain_node state="sync" job="Sync" next_state="success" error_state="error"/> <job_chain_node state="success"/> <job_chain_node state="error"/> </job_chain> |
2. Like 1. but now, you want to wait for more than one order.
- Same steps as at 1.
- You can specify for each job chain, how many orders have to be at the sync point to set the node to GO. Note: If you want to specify it for different nodes, you can use parameter [job_chain];[state]_required_orders
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?> |
Code Block |
<job title="Synchronize Job Chains" order="yes"> <params> <param name="job_chain1_required_orders" value="3"/> <param name="job_chain2_required_orders" value="1"/> </params> <script language="java" java_class="sos.scheduler.job.JobSchedulerSynchronizeJobChains"/> </job> |
3. You have job chains A,B ,and C. C can start, when A or B are finished.
specify parameter minimumSyncHits=1.
...
=
...
1.
...
Code Block |
---|
<job title="Synchronize Job Chains" order="yes"> <params> <param name="minimumSyncHits" value="1"/> </params> <script language="java" java_class="sos.scheduler.job.JobSchedulerSynchronizeJobChains"/> </job> |