-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR introduces two new methods for invoking workflows from handlers. For workflow bar in class Foo with argument arg: - `ctxt.startWorkflow(Foo).bar(arg)` starts the workflow and returns its handle. This is equivalent to the current `ctxt.invoke(Foo).bar(arg)`. - `ctxt.invokeWorkflow(Foo).bar(arg)` executes the workflow and returns its result. This is equivalent to the current `ctxt.invoke(foo).bar(arg).then((x)=>x.getResult())`. The latter is very unintuitive and is tripping users up. To avoid confusion, we also deprecate calling `invoke` on workflows--use one of the new methods instead. My hope is that this makes it much clearer to users what is actually happening when a handler invokes a workflow.
- Loading branch information
Showing
19 changed files
with
208 additions
and
137 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
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
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
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
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
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
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
Oops, something went wrong.