Table of Contents |
---|
| outlinh1. true |
---|
| outlinh1. true |
---|
1 | printablefalse |
---|
2 | stylh1. none |
---|
3 | indent20px |
---|
|
Aus einer Jobkette mehrere weitere Jobketten aufrufenStarting a job chain from a running job chain
1. Erstellen Sie einen Job create a job CallJobchain
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
Code Block |
---|
<job order="yes"
stop_on_error="no"
enabled="yes"
name="CallJobchain">
<settings>
<log_level><![CDATA[debug9]]></log_level>
</settings>
<params/>
<script language="javascript">
<![CDATA[
function spooler_process()\{
var thisOrder = spooler_task.order;
var order = spooler.create_order();
var execute_jobchain = thisOrder.params.value("execute_jobchain");
order.id = thisOrder.id + "_next" ;
order.params.merge(thisOrder.params);
spooler.job_chain( execute_jobchain ).add_order( order );
return true;
\}
]]>
</script>
<run_time/>
</job>
|
2. Erstellen Sie mit dem Jobwizzard einen Sync-Jobcreate s sync job using job wizzard
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
Code Block |
---|
<job title="Synchronize Job Chains"
order="yes"
tasks="1"
enabled="yes"
name="Sync">
<description>
<include file="jobs/JobSchedulerSynchronizeJobChains.xml"/>
</description>
<params/>
<script language="java"
java_class="sos.scheduler.job.JobSchedulerSynchronizeJobChains"
java_class_path=""/>
<run_time/>
</job>
|
3. Erstelle Sie eine Jobkette JobchainSampleChainNext mit n Knoten und fügen Sie dem letzten Knoten den Sync Job zuCreate a job chain JobchainSampleChainNext with n nodes and add a node with sync job.
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
Code Block |
---|
<job_chain orders_recoverable="yes"
visible="yes"
name="JobchainSampleChainNext">
<job_chain_node state="100"
job="job_sample_4"
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>
|
4. Erstellen Sie eine Jobkette sampleNestedJobchain. Ein Knoten wird CallJobchain zugewiesen. In diesem Knoten setzen Sie einen Parameter Create a job chain sampleNestedJobchain. One node is assigned to CallJobchain. This node sets the parameter execute_jobchain=JobchainSampleChainNext. Danach folgt der Sync-KnotenThe sync job is the succesor of this node.
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
...