Page History
...
The Options Instruction rules error handling for a number of other instructions:
...
- The motivation for this behavior being that Locks and Notices are considered resources that should not be blocked by failed orders.
- For example, if a Lock Instruction is used to limit access to a database by parallel jobs. In case of failure of a job the order moves to the begin of the Lock Instruction to free the resource.
- For example, if a ConsumeNotices Instruction is used to expect and to delete a Notice in transactional manner. In case of failure the order moves to the begin of the ConsumeNotices Instruction to allow other ConsumeNotices Instructions in parallel workflows to delete the Notice and not to delay deletion by a failed order.
- This behavior similarly applies to use of nested Lock Instructions and nested ConsumeNotices Instructions.
- A failed order will be moved to the outmost Lock Instruction or ConsumeNotices instruction to free any resources blocked by nested instructions.
...
- the Options Instruction is used to set the StopOnFailure attribute.
- the first Lock Instruction expects the
pdErrorLockBig
Lock being present. - the second Lock Instruction occurs inside the first instruction and expects the
pdErrorLockSmall
Lock being present. - the
job3a
job is assumed to fail with return code3
.
In the Configuration view the workflow looks like this:
...
- the failed order remains with the failed job.
- the
pdErrorLockBig
andpdErrorLockSmall
Resource Locks remain blocked by respective Lock Instructions and are not freed before the order leaves the instruction block.
...
- no Options Instruction is used.
- the first Lock Instruction expects the
pdErrorLockBig
Lock being present. - the second Lock Instruction occurs inside the first instruction and expects the
pdErrorLockSmall
Lock being present. - the
job3a
job is assumed to fail with return code3
.
In the Configuration view the workflow looks like this:
...
- the failed order moves to the outmost Lock Instruction and remains in a failed state.
- the
pdErrorLockBig
andpdErrorLockSmall
Locks are freed and are availble available to other byother Lock Instructions.
ConsumeNotices Instruction
Use
...
with StopOnFailure Option
This example introduces a situation when users find a nested JS7 - ConsumeNotices Instruction.
...
- the Options Instruction is used to set the StopOnFailure attribute.
- the first ConsumeNotices Instruction expects the
Notice01
Notice being present. - the second ConsumeNotices Instruction occurs inside the first instruction and expects the
Notice02
Notice being present. - the
job3a
job is assumed to fail with return code3
.
In the Configuration view the workflow looks like this:
...
- no Options Instruction is used.
- the first ConsumeNotices Instruction expects the
Notice01
Notice being present. - the second ConsumeNotices Instruction occurs inside the first instruction and expects the
Notice02
Notice being present. - the
job3a
job is assumed to fail with return code3
.
In the Configuration view the workflow looks like this:
...
- the failed order moves to the outmost ConsumeNotices Instruction.
- the
Notice01
andNotice02
Notices are freed and remain available for parallel ConsumeNotices Instructions in other workflows.
Further Resources
Overview
Content Tools