Versions Compared

Key

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

...

  • Job parallelism applies to the number of instances of a job that are executed by parallel orders.
    • For example, if a workflow includes a number of jobs for which parallelism is limited to 1 task then the following applies:
      • With 3 orders entering the workflow the first order will execute job1. The remaining orders wait in front of job1.
      • With job1 being processed then order1 moves on and starts to process job2.
      • At the same time order2 will start to process job1.
      • With job1 being processed then order2 to moves to process job2 and order3 starts to process job1.
    • This means that job parallelism allows any number of orders to be active in a workflow. It limits the number of orders that execute a job in parallel.
  • Order serialization is intended to make any additional orders wait for a previous order to complete the workflow before entering they will enter the workflow.

Use of Lock Instruction

...

Download (upload .json): 

In the Configuration view the workflow looks like this:

  • the Lock Instruction spawn spawns any jobs and other instructions in the workflow.
  • the pdSerialLockSingle Resource Lock is used in exclusive mode to prevent access by parallel orders.

...

Shared Use of Lock

The Lock InstructionInstructions in this example explains implement mixed use of limiting and preventing the number of additional orders in different sections of a workflow:

...

Download (upload .json): pdSerialLockNested

In the Configuration view the workflow looks like this:

  • two Lock Instructions
    • the outer Lock Instruction spawn spawns any jobs and other instructions in the workflow and makes shared use of a Resource Lock with using weight 1.
    • the inner Lock Instruction spawns a specific section in the workflow and makes exclusive use of a Resource Lock.
  • two Resource Locks are used
    • the pdSerialLockMulti Resource Lock is used in shared mode by the outer Lock Instruction to limit access by parallel orders, for example to 10 orders.
    • the pdSerialLockSingle Resource Lock is used in exclusive mode by the inner Lock Instruction to prevent access by parallel orders.

...

The configuration of the pdSerialLockSingle Resource Lock looks like in the above example.
The configuration of the pdSerialLockMulti Resource Lock allows the lock to be acquired in parallel by any number of orders up to its capacity like this:

...

  • three orders acquire the outer Resource Lock and enter the outer section of the workflow in parallel.
  • one order acquires the inner Resource Lock and is running in the workflow's inner section.
  • one order is running in the outer section of the workflow.
  • one order is waiting in the outer section of the workflow as job parallelism is limited to 1.
  • it is guaranteed that ony only one order at a time will enter the inner section  of the workflow.

...

Use of Options Instruction and Lock Instruction

Considering error handling the previous examples allow additional orders to enter a workflow if a previous order fails and is moved to the outmost Lock Instruction in a workflow.

Users might wish a more strict behavior preventing additional orders to enter a workflow even in case that a previous order fails in a workflow. To this purpose the JS7 - Options Instruction is used which causes an order to remain with the failing job and prevents additional orders from entering the workflow.

Exclusive Use of Lock

The example applies to use of a single lock in shared mode.

Download (upload .json): 

In the Configuration view the workflow looks like this:

  • the Options Instruction

...

  • spawns any instructions in the workflow.
  • the Lock Instruction spawns subsequent jobs and other instructions in the workflow.
  • the pdSerialLockSingle Resource Lock is used in exclusive mode to prevent access by parallel orders.

Image Added


In the Workflows view at run-time the workflow looks like this:

  • one order is running in the workflow.
  • any additional orders wait in front of the workflow.

Shared Use of Lock

Further Resources

...