Versions Compared

Key

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

...

For earlier JS7 releases a dummy job has to be added to the Catch block to force a successful outcome for the order.

Code Block
titleExample for catching a job error by use of a recovery job
linenumberstrue
collapsetrue
Try
    job1
    job2
Catch
    job2a
Catch-End
job3

...

Code Block
titleExample for catching a job error with failed history outcome
linenumberstrue
collapsetrue
Try
    job1
    job2
Catch
    FailFinish (fail and leave workflow)
Catch-End
job3

...

  • if any of job1 or job2 in the Try block raises an error then the order enters the Catch block.
  • In the Catch block the Fail instruction Finish instruction makes the order leave the workflow. The Fail Finish instruction can be is parameterized to either stop an order or to make an order leave create a successful or unsuccessful History outcome when the order leaves the workflow.
    • If the above example is applied to child orders, for example in branches of Fork-Join and ForkList-Join instructions then the Fail instruction will make the child order leave the branch.
  • An order that enters the Catch block will not execute job3.

...

Jira
serverSOS JIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJS-2014
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
use_case_4
use_case_4
Use Case 4: Job error makes order leave workflow with successful history outcome

...

Code Block
titleExample for catching a job error with successful history outcome
linenumberstrue
collapsetrue
Try
    job1
    job2
Catch
    Finish (succeed and leave workflow)
Catch-End
job3

Explanation:

...