Open topic with navigation

TIBCO Business Studio™ - BPM Edition 5.4.0

# Using the Cancellation Event Handler

You can execute a cancellation event handler flow (only one per process) to manage the cancellation of a process and its sub-processes.

Procedure
1. How to cancel a sub-process task: Attach a catch intermediate event to a call sub-process task in your main process, with a trigger type of Catch Signal. The Catch Action should be Cancel task when signal caught.
   Alternatively, you cancel a process sub-process task with a task boundary event as follows:

   Timer:

   Signal:

   The tree of sub-process instances that were instantiated from a sub-process task are canceled from the bottom up. If the sub-processes need to execute compensation actions to close down gracefully they can do so using Cancellation Event handlers.

2. The Sub-Process Cancellation event handler: Add activities to perform any actions required prior to the final sub-process cancellation. A common pattern would be to use throw-catch compensation as in the example below, where there is an intermediate catch event with trigger type Catch Compensation on each task in the sub-process, which requires compensation events. Compensation events execute their actions if only when the task they're attached to has been executed. Thus, there is not a need to manually conditionalize compensating tasks depending on progress through the main process flow.
   Note: Cancel event handlers are only executed for process-driven cancellation (not for user/API-driven process cancellations).
   Note: The cancel event handler does not have to trigger compensation event handlers. It might either generate signal events into the main part of the process or just perform the compensatory actions directly.

   Note:
   - The sub-process can also invoke another sub-process (and so on) with more cancel event handlers.
   - There does not have to be a cancel event handler in each sub-process if it is not required.
   - Cancellation event handlers are not executed when a process instance is canceled through Process Manager API, either from an external application or from the Openspace client.
   - If a cancellation event handler fails, then you receive an audit event and should be able to recover from a halted state.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Business Studio™ - BPM Edition

Copyright © 2015-2023. Cloud Software Group, Inc. All Rights Reserved.