Skip to content

Commit 9e23e35

Browse files
durable-workflow.github.io: update v2 changes
1 parent 627700a commit 9e23e35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/features/sagas.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ $this->setContinueWithError(true);
9393

9494
When enabled, the engine catches and discards exceptions from each compensation closure and continues to the next one. This is useful when compensations are independent and you want a best-effort cleanup even if some steps fail.
9595

96+
### Combining both flags
97+
98+
`setParallelCompensation(true)` and `setContinueWithError(true)` can be used together. When both are enabled, all compensations run concurrently through `all()`, and if any compensation throws, the error is caught so the remaining compensations still complete. Without `setContinueWithError(true)`, a parallel compensation failure propagates immediately and the workflow fails.
99+
100+
```php
101+
$this->setParallelCompensation(true);
102+
$this->setContinueWithError(true);
103+
```
104+
96105
## How it works
97106

98107
- `addCompensation()` registers a callable that will be invoked during `compensate()`

0 commit comments

Comments
 (0)