Replies: 1 comment
|
https://laravel-workflow.com/docs/features/sagas/ is how you would handle that across activities. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to implement a workflow where I start a database transaction, then perform a series of RDB updates across multiple activities.
If any activity fails or throws an exception, I want to roll back the entire transaction.
However, since activities are executed asynchronously (via job queues), it seems that wrapping the workflow or activities in a traditional DB::transaction() doesn’t work as expected.
Is there a recommended way to handle this kind of rollback behavior across multiple activities?
Should I use compensating activities or any other pattern that works well with laravel-workflow?
Any guidance or best practices would be greatly appreciated!
All reactions