Repository navigation
Conversation
Signed-off-by: gomitrah <bala.c@mitrahsoft.in>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates the Go example in the "External system interaction" pattern
(
workflow-patterns.md) to demonstrate the newWorkflowContext.Selectcombinator added in
dapr/durabletask-go#131,per this review comment
asking for Go workflow docs examples of the new function.
The Go
PurchaseOrderWorkflowexample previously relied onWaitForExternalEvent's built-in timeout and returned a vague"error/cancelled", erron timeout. This brings it to parity with thePython (
when_any) and JavaScript (whenAny) versions of the sameexample on this page, which already explicitly race the approval event
against a separate timer and return a clean
"Cancelled"string.While rewriting this function, also fixed two calls to
workflow.ActivityInput(order)-- a function that doesn't exist in thereal
durabletask-goworkflowpackage -- to the correctworkflow.WithActivityInput(order). These two calls sit directlyinside the function being rewritten for the
Selectexample; the sameincorrect name still appears in ~13 other places across this repo
(
workflow-patterns.md,workflow-features-concepts.md,howto-author-workflow.md, andsdkdocs/go/.../go-client/_index.md),which is out of scope for this PR and left for a follow-up.
Issue reference
No
dapr/docsissue exists for this. Responds to a review request ondapr/durabletask-go#131.