...
- 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.
The Join Orders Job
The Join Orders Job is a Java JITL Job that is configured using the Job Wizard in the JobScheduler Object Editor, JOE.
The Join Orders Job cannot execute a shell script.
Join Patterns
The example described in this article shows the use of a single instance of the Join Orders Job within a single Job Chain. Multiple instances of the Join Orders Job can also be used within a Job Chain. See the Configuration section of the JobSchedulerJoinOrders documentation for more information.
...
- The required_orders parameter is read immediately by the Join Orders Job, which will then wait until the number of Orders specified in the parameter (here it is 12) have been processed.
- Note that the Join Orders Job only counts orders that have the state of the Join Orders Job as their end state (here join).
- The main_order moves to the generate_orders Job, which generates a total of 10 Child Orders.
- This number is specified in a second parameter for the main_order - generate_orders.
- 5 of these child orders start processing at node 150 and 5 will start at node 160. All the Child Orders will end at the Join Job.
- The branch of the Job Chain the Child Orders are executed on is not important for the Join Orders Job.
- All these Child Orders will be counted towards the required_orders parameter.
- Child Orders are given identified when:
- They have an Id based on the Parent Order ID plus an underscore plus a string.
- For example, the first generated Child Order in the example will be given the ID main_order_0.
- They have an Id based on the Parent Order ID plus an underscore plus a string.
- The main_order itself then moves to Job A where it waits for a time specified in the main_order's duration_job_a parameter (here 35 seconds).
- The sole purpose of this delay is to demonstrate that the main_order can reach the Join Orders Job after the other Orders.
- This delay is not necessary for the functioning of the Join Orders Job and the example will work with the duration_job_a parameter set to its minimum value of 1 (0 will cause an error).
- When the main_order reaches the Join Orders Job it will be counted towards the number of Orders specified in the required_orders parameter, making a total of 11 after all the generated Child Orders have been completed.
- Note that the main_order is the only Order that will be counted that does not have to have the state of the Join Orders Job as its end state.
- The main_order will now be suspended at the Join Orders Job (without the Job being processed) until:
- a further Order that has the state of the Join Orders Job as its end state is completed.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="ISO-8859-1"?> <job_chain title="Y Join"> <job_chain_node state="100" job="generate_orders" next_state="wait" error_state="error"/> <job_chain_node state="150" job="job_a" next_state="join" error_state="error" delay="10"/> <job_chain_node state="wait" job="wait" next_state="join" error_state="error"/> <job_chain_node state="join" job="join" next_state="200" error_state="error"/> <job_chain_node state="200" job="job_b" next_state="success" error_state="error"/> <job_chain_node state="success"/> <job_chain_node state="error"/> </job_chain> |
The Jobs
The Join Orders Job
The configuration of the Join Orders Job is set using the JITL Job Wizard and shown in following code block. Relevant for users in the following listing is the show_join order list parameter which may be optionally set (default is false). Setting this Parameter to true causes a list of all the orders counted by the Join Orders Job to be written to the log file for the Parent Order.
...