Page History
...
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.
Find more examples and details from the JS7 - Options Instruction article.
Exclusive Use of Lock
The example applies to use of a single lock in shared mode.
...
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. - the
job2
job is assumed to fail with return code3
.
In the Workflows view at run-time the workflow looks like this:
- one order is running remaining in the workflow in a failed state with
job2
. - any additional orders wait in front of the workflow Lock Instruction.
Shared Use of Lock
The example implements mixed use of limiting and preventing the number of additional orders in different sections of a workflow:
- the outer section of the workflow can be executed by a limited number of orders.
- the inner section of the workflow can be executed by single order only.
Download (upload .json):
- Resource Lock: pdSerialLockMulti.lock.json
- Resource Lock: pdSerialLockSingle.lock.json
- Workflow: pdSerialOptionsLockNested.workflow.json
In the Configuration view the workflow looks like this:
- the Options Instruction spawns any instructions in the workflow.
- the outer Lock Instruction spawns subsequent jobs and other instructions in the workflow.
- the
pdSerialLockMulti
Resource Lock is used in shared mode to allow a number of parallel orders.
- the
- the inner Lock Instruction spawns a section of the workflow that should be used by single order only.
- the
pdSerialLockSingle
Resource Lock is used in exclusive mode to prevent access by parallel orders.
- the
- the
job2
job is assumed to fail with return code3
.
Further Resources
...