-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(compensation): add compesation handler marker
- Loading branch information
Showing
6 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Binary file added
BIN
+58.5 KB
...onents/modeler/bpmn/compensation-handler/assets/compensation-marker-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
44 changes: 44 additions & 0 deletions
44
docs/components/modeler/bpmn/compensation-handler/compensation-handler.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
id: compensation-handler | ||
title: "Compensation handler" | ||
description: "A compensation handler is an activity used to undo already executed tasks" | ||
--- | ||
|
||
The following activities can be marked as compensation: | ||
|
||
- [Service tasks](../service-tasks/service-tasks.md) | ||
- [User tasks](../user-tasks/user-tasks.md) | ||
- [Send tasks](../send-tasks/send-tasks.md) | ||
- [Receive tasks](../receive-tasks/receive-tasks.md) | ||
- [Business rule tasks](../business-rule-tasks/business-rule-tasks.md) | ||
- [Script tasks](../script-tasks/script-tasks.md) | ||
- [Manual tasks](../manual-tasks/manual-tasks.md) | ||
- [Undefined tasks](../undefined-tasks/undefined-tasks.mdx) | ||
|
||
![Compensation marker example](assets/compensation-marker-example.png) | ||
|
||
## Compensation handlers | ||
|
||
Compensation handlers are activities or subprocesses attached to other activities using a compensation boundary event. When the process reaches a compensation throw event, it triggers the compensation handlers. If the compensation activity has been completed more than once, the compensation handler is invoked for the same amount. | ||
|
||
If the compensation handler has input variable mappings, those are applied before completing the compensation handler. At the same way, if the compensation handler has output variable mappings, those are applied after invoking the compensation handler. | ||
|
||
Compensation handlers might be interrupted if the process or subprocess is terminated, interrupted compensation handlers aren't reactivatable. | ||
|
||
### Embedded subprocess as compensation handler | ||
|
||
![Process with subprocess as compensation handler](assets/subprocess-compensation-handler.png) | ||
|
||
The subprocess contains the steps to undo the actions of the compensation activity. Using a subprocess can be useful if a sequence of steps is required to undo the actions of the activity. | ||
|
||
### Call activity as compensation handler | ||
|
||
![Process with call activity as compensation handler](assets/call-activity-compensation-handler.png) | ||
|
||
The call activity contains the steps to undo the actions of the compensation activity. Using a call activity can be useful in combination with a call activity as the compensation activity since compensation isn't propagated to the child process. | ||
|
||
### Multi instance activity as compensation handler | ||
|
||
![Process with multi instance activity as compensation handler](assets/multi-instance-compensation-handler.png) | ||
|
||
The multi-instance activity offers the option to operate sequentially or in parallel, and it requires an input collection. Combining it with a compensation activity is advantageous, as the compensation handler for a multi-instance activity is invoked only once, rather than for each item in the input collection. Notably, both the compensation activity and its handler can iterate over the same input collection items. |