generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow FSMs to specify the next event to send (#1723)
closes #1664 closes #2334 This is particularly useful when an FSM state itself knows which state it should be in next, for example transitioning a payment to "voided" if an error occurs communicating with an external vendor. - Adds `fsm.Next(ctx, event)` to the go runtime - Only one next transition is allowed per fsm instance - When a transition completes, the next transition is queued up if it exists - When a transition returns an error, we wipe the next transition so that the retry attempt can set the next transition again In another PR we will move away from using `ftl.Next()` to avoid the reference cycle issue. --------- Co-authored-by: Matt Toohey <[email protected]>
- Loading branch information
1 parent
2b27ccc
commit ea46c80
Showing
40 changed files
with
1,371 additions
and
315 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,5 @@ | ||
package sql | ||
|
||
import csql "github.com/TBD54566975/ftl/backend/controller/sql" | ||
|
||
type Type = csql.Type |
Oops, something went wrong.