Versions Compared

Key

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

...

  • The ForkList Instruction is the dynamic version of the JS7 - Fork / -Join Instruction.
  • Technically it implements the Fork / Join operation, however, it offers to create the allows a number of branches to be created dynamically from order variables:
    • The ForkList Instruction expects an order to provide a Variable Set that is implemented as a list (array) of values. The list can include any number of name/value pairs (variables).
    • The ForkList Instruction is designed as a single branch when configuring the workflow with the Configuration View of the JOC Cockpit user interface. Depending on the number of entries provided with a ForkList Variable Set carried by an order the Agent will dynamically create branches for each entry of the Variable Set.
  • The underlying use case suggests that users want to execute the same workflow in parallel for each element of a Variable Set.
  • 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 following options apply to error handling with child orders:
      • Default: If a job in a child order's branch fails then the child order is assigned the FAILED state. 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 of moving a child order to the branch end.
        • Note that resuming a child order from its branch end will not modify its FAILED state that , which is adopted by the parent order.
        • Users who want to force successful execution of a failed child order should resume the child order from a job node that is has been executed successfully.
      • 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.
    • Child orders cannot be cancelled as they are required to pass the Join Instruction. Should child orders not be intended to pass the remaining instructions in a branch then a , the user can resume failed child orders from the Join Instruction.
    • Consider Note that child orders can take the role of parent orders in nested ForkList Instructions.

Workflow Instruction: ForkList

The workflow editor offers is used to add a ForkList Instruction like this as shown:


Explanation:

  • The ForkList Instruction is assigned a Variable Set countries that is of type List.
    • Assignment is available when displaying workflow properties and when selecting the ForkList Instruction in the editor panel.
    • The Variable Set makes use of one or more variables, the example uses the countryCode variable with type String.
    • Any number of variables can be added to a Variable Set.
  • When an order is added to this workflow then it has to provide the countries Variable Set populated with country codes.
  • For each element of the Variable Set, i.e. for each country code, JS7 will dynamically creates create a branch with the ForkList Instruction.
    • Child orders are created for each branch that runs running in parallel.
    • The handling of child orders is the same as for the Fork Instruction.
  • A workflow can include any number of ForkList Instructions.
    • ForkList Instructions can be nested and a branch can include e.g. , for example, Fork Instructions, Resource Lock Instructions etc.
    • More than one ForkList Instruction can use the same Variable Set.
  • The Join If Failed property determines the behavior in case of failed child orders:
    • If checked then failed child orders terminate immediately and cause the parent order to adopt the FAILED state.
    • If not checked then failed child orders will be halted and allow user intervention to resume execution from an node of the child order's branch.

...