...
- 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.
- It is not important whether or not Child Orders take the same The branch of the Job Chain as the main_orderthe 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 an Id based on the Parent Order ID plus a string.
- For example, the first generated Child Order in the example will be given the ID main_order_0.
- The main_order itself then moves to the Wait Job where it waits for a time specified in the main_order's wait_time 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 wait_time 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.
...