0 Interruptions Messages, Events, and Cancel
Dan Funk edited this page 2021-12-23 15:29:14 -05:00

It is possible to create and catch exceptions in the normal flow of a workflow, using events.

For CR-Connect we need a way to inform workflows that they are being interrupted. This will happen whenever someone starts the workflow over, or navigates away from the current active task back to a previous point in the workflow (sometimes called a Token Reset).

There are two ways to catch such an event:

  1. Using a signal event called "cancel" attached to a task.
  2. using a Cancel Event on a transaction sub-process.

Using a Signal Event to capture a Cancel

Here is an example workflow. The HowMany activity has a Signal event. This can be an interrupting or non-interrupting event, it will not affect the behaviour in this case, because things are definitely going to be interrupted once the signal event completes, because we are manually halting the workflow in some way.

Be sure that your signal is set to pick up the "cancel" by defining that global event.

Using a cancel event

To use the cancel event you will need to wrap the tasks in a transactional sub-process, as shown below

Note that the sub-process is surrounded by a double line, denoting that it is a transaction.