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:
...
- create a job "SynchroniseJobChains" named "sync" using the job wizzard 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
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 |
---|
<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> |
...
- 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 |
---|
<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>
|
...
specify parameter minimumSyncHits=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>
|