Skip to content

Commit

Permalink
adding external events back to workflow docs
Browse files Browse the repository at this point in the history
Signed-off-by: nyemade-uversky <55847877+nyemade-uversky@users.noreply.github.com>
  • Loading branch information
nyemade-uversky committed Feb 22, 2023
1 parent ed62079 commit 2bb5016
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -108,6 +108,12 @@ Dapr Workflows allow you to schedule reminder-like durable delays for any time r
Some APIs in the workflow authoring SDK may internally schedule durable timers to implement internal timeout behavior.
{{% /alert %}}

## External events

Sometimes workflows will need to wait for events that are raised by external systems. For example, an approval workflow may require a human to explicitly approve an order request within an order processing workflow if the total cost exceeds some threshold. Another example is a trivia game orchestration workflow that pauses while waiting for all participants to submit their answers to trivia questions. These mid-execution inputs are referred to as _external events_.

External events have a _name_ and a _payload_ and are delivered to a single workflow instance. Workflows can create "_wait for external event_" tasks that subscribe to external events and _await_ those tasks to block execution until the event is received. The workflow can then read the payload of these events and make decisions about which next steps to take. External events can be processed serially or in parallel. External events can be raised by other workflows or by workflow code.

{{% alert title="Note" color="primary" %}}
The ability to raise external events to workflows is not included in the alpha version of Dapr's workflow API.
{{% /alert %}}
Expand Down

0 comments on commit 2bb5016

Please sign in to comment.