Page History
Table of Contents |
---|
Introduction
JS7 offers a number of strategies for error handling that are explained from the below matrix.
...
Use Case | Job | Order | Order History | Notification | User Intervention | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
No. | On Error | On Warning | Stopped | Continued | Finished | Successful | Failed | Optional | Resume Order | Suspend Order | Cancel Order |
Use Case 1 | yes | no | yes | no | no | - | - | yes | yes | yes | yes |
Use Case 2 | yes | no | no | yes | no | - | - | yes | - | - | - |
Use Case 3 | yes | no | no | no | yes | no | yes | yes | - | - | - |
Use Case 4 | yes | no | no | no | yes | yes | no | yes | - | - | - |
Use Case 5 | no | yes | no | yes | no | - | - | yes | - | - | - |
Use Cases
Anchor | ||||
---|---|---|---|---|
|
In this scenario an order stops subsequently to a job error. The order is put in the failed state. This is the default behavior if no workflow instructions for error handling are used.
...
- If any of
job1
,job2
orjob3
raises an error then the order stops and is put in the failed state. - User Intervention is required to resume, to suspend or to cancel the order.
Anchor | ||||
---|---|---|---|---|
|
In this scenario a job error is caught and is handled in a way that lets the order continue in the workflow:
...
- if any of
job1
orjob2
in the Try block raises an error then the order will enter the Catch block. - In the Catch block
job2a
is executed.- If
job2a
completes successfully then the order will leave the Catch block and will continue withjob3
. - If
job2a
fails then the order will be put in the failed state, will be stopped and will remain in the Catch block to wait for User Intervention - Consider that Try-Catch instructions can be nested, i.e. in a Catch block another Try-Catch instruction can be used for error handling.
- If
Anchor | ||||
---|---|---|---|---|
|
In this scenario a job error is caught and is handled in a way that makes the order leave the workflow:
...
For earlier JS7 releases users apply the Finish instruction instead of the Fail instruction in the Catch block to make an order leave the workflow with a failed History outcome.
Anchor | ||||
---|---|---|---|---|
|
Similar to use case 3 in this scenario a job error is caught and is handled in a way that makes the order leave the workflow:
...
For earlier JS7 releases users have to add a dummy job before the Finish instruction that guarantees successful execution in order to specify a successful History outcome.
Anchor | ||||
---|---|---|---|---|
|
In this scenario job errors are considered being warnings based on a selection of job return codes. Such warnings do not require specific error handling, instead the order will continue in the workflow.
...
For earlier JS7 releases Notifications are not sent in case of job warnings.
Resources
...