You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Scope

The Join Job (JobSchedulerJoinOrders) is used to join up two parallel executing child segments in a Job Chain. It then continues processing in a single thread once processing of the parallel threads has been completed. It is used in two Job Chain Patterns - split and join and "Y".

The Join Job can only be used within a Job Chain and is only available for JobScheduler versions 1.11.4 and newer, See the How To Synchronize Job Execution Across Job Chains article for information about synchronizing Jobs in different Job Chains and for joining up parallel executing child Job Chain segments in JobScheduler versions 1.11.3 and older.

Job Chain Patterns

split and join Pattern

The configuration of the Join Job for the split and join pattern is described in the How to Execute Jobs in a Job Chain in Parallel article.

Relevant for the current article is that while the Join job is used without any parameters being configured, the Split Job generates a parameter - required_orders - which is forwarded to the Join Job. 

  • sync_state_name:
    • This parameter is required for the Job Chain Details view in the JOC Cockpit and for the Job Chain Diagram shown in JOE. It accepts the value of the state that is associated with the join Job node.

'Y' Pattern

The ....

The...

The job_create_orders Job
<?xml version="1.0" encoding="ISO-8859-1"?>

<job  order="yes" stop_on_error="no">
    <script  language="java:javascript">
        <![CDATA[
function spooler_process(){
    var jobChain = spooler.job_chain('/join/job_chain_test');
    for (i=0;i<10;i++){
       var order = spooler.create_order();
       order.id = spooler_task.order.id + "_" + i;
       order.params.merge(spooler_task.order.params);
       order.end_state="join";
       order.state="150";
       jobChain.add_order(order);
    }
    return true;
}
        ]]>
    </script>

    <run_time />
</job>

The test Order starts the first Job (job_create_orders) in the job_chain_test Job Chain:

  • this Job contains a shell script that generates 10 orders (see line XX of the listing) for the branch of the Job Chain from the job_nix Job to the join Job.
  • As the end_state for the generated Orders is the join Job state, these orders will be registered by the join job and counted towards to the value set by the job_create_orders shell script in the

.....

  • No labels