Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The Fork Instruction allows orders to be forked and joined to enable parallel processing in a workflow.
  • The Fork Instruction allows creation of a number of parallel branches that which process further instructions and jobs.
    • Branches can include any number of instructions and jobs.
    • Branches can include nested Fork Instructions that which are limited to 15 levels.
  • When an order enters a Fork Instruction then a child order is created for each branch.
    • Each child order will pass the nodes in its branch independently of parallel child orders.
    • Child orders can return results to parent orders by passing variables.
    • Note that child orders take the role of parent orders in nested Fork Instructions.
  • While child orders are running, the parent order waits for its child orders to be completed, i.e. to arrive at the Join Instruction. The parent order therefore is assigned the WAITING state, see JS7 - Order State Transitions.
  • The Fork Instructions offers two variants:

...

This video explains how to create parallel jobs in a workflow that can which an be nested and joined in a workflow.

Widget Connector
urlhttps://www.youtube.com/watch?v=9HUWk_nfROM&ab_channel=JobScheduler

...

  • Default behavior: If a job in a child order's branch fails then the child order is assigned the FAILED state and remains with the offending job node. Such child orders require user intervention to resume execution. When resuming a child order then it can restart from the same or from any previous or later node in the child order's branch. This includes the option to move a child order to the branch end.
    • Note that resuming a child order from its branch end will not modify its unsuccessful outcome that is inherited by the parent order.
  • Alternative behavior:
    • If a job in a child order's branch fails then the child order terminates immediately and the parent order is put to the FAILED state. This behavior can be activated by use of the Join if Failed flag of the Fork Instruction.
    • Use of the JS7 - Try-Catch Instruction allows to recover recovery of an order from a failed job and by:
      • to proceed proceeding in the child order's branch using and an empty Catch Instruction or
      • to execute executing other instructions and jobs included with the Catch Instruction.
    • Use of the JS7 - Finish Instruction allows child orders to leave the current branch:
      • with a successful outcome independently from of the fact that a previously executed job failed,
      • with an unsuccessful outcome that which will be adopted by the parent order and put the parent order in the FAILED state.

...

While child orders are running, the parent order waits will wait for its child orders to be completed, i.e. to arrive at the Join Instruction. The parent order therefore is assigned the WAITING state, see JS7 - Order State Transitions.

...

Child orders can be suspended or cancelled both individually and from bulk operations:

  • If a child order is suspended then it is put to the SUSPENDED state. As a result the child order completes its current instruction and stops with at the next node and . It remains in this state until being later on it is either resumed or cancelled at a later point. If the operation to suspend suspending an order is used with the kill option then the job that is currently executed by the child order will be killed and the orders will be suspended with at the next node.
  • Child orders can be cancelled, however , - they will not leave the workflow but will leave their current branch and jump to the Join Instruction. Should child orders not be intended to pass the remaining instructions in a branch, then they can be resumed from the Join Instruction. The cancel operation allows the child order to complete its current node unless the kill option is used that will kill a running job executed by the order.
  • Consider Note that child orders can take the role of parent orders in nested Fork Instructions.

Consider Note that any operation to suspend or to cancel operations suspending or cancelling child orders work asynchronously as the jobs that which are executed for child orders could be used with Agents on different servers. Therefore any bulk operation to suspend/cancel all child orders boil down to an individual operation and result per child order.

...