mirror of https://github.com/dapr/docs.git
mark review
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
parent
379bb4bbde
commit
963a2018de
|
@ -24,7 +24,7 @@ Dapr Workflow logic is implemented using general purpose programming languages,
|
||||||
- Use debuggers and examine local variables
|
- Use debuggers and examine local variables
|
||||||
- Write unit tests for your workflows, just like any other part of your application logic
|
- Write unit tests for your workflows, just like any other part of your application logic
|
||||||
|
|
||||||
The Dapr sidecar doesn’t load any workflow definitions. Rather, the sidecar simply drives the execution of the workflows, leaving all other details to the application layer.
|
The Dapr sidecar doesn’t load any workflow definitions. Rather, the sidecar simply drives the execution of the workflows, leaving all the workflow activities to be part of the application.
|
||||||
|
|
||||||
## Write the workflow activities
|
## Write the workflow activities
|
||||||
|
|
||||||
|
@ -170,4 +170,4 @@ Now that you've authored a workflow, learn how to manage it.
|
||||||
## Related links
|
## Related links
|
||||||
- [Workflow overview]({{< ref workflow-overview.md >}})
|
- [Workflow overview]({{< ref workflow-overview.md >}})
|
||||||
- [Workflow API reference]({{< ref workflow_api.md >}})
|
- [Workflow API reference]({{< ref workflow_api.md >}})
|
||||||
- Learn more about [how to manage workflows with the .NET SDK](todo) and try out [the .NET example](https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow)
|
- [Try out the .NET example](https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow)
|
||||||
|
|
|
@ -29,4 +29,4 @@ Hit the ground running with our Dapr quickstarts, complete with code samples aim
|
||||||
| [Secrets Management]({{< ref secrets-quickstart.md >}}) | Securely fetch secrets. |
|
| [Secrets Management]({{< ref secrets-quickstart.md >}}) | Securely fetch secrets. |
|
||||||
| [Configuration]({{< ref configuration-quickstart.md >}}) | Get configuration items and subscribe for configuration updates. |
|
| [Configuration]({{< ref configuration-quickstart.md >}}) | Get configuration items and subscribe for configuration updates. |
|
||||||
| [Resiliency]({{< ref resiliency >}}) | Define and apply fault-tolerance policies to your Dapr API requests. |
|
| [Resiliency]({{< ref resiliency >}}) | Define and apply fault-tolerance policies to your Dapr API requests. |
|
||||||
| [Workflow]({{< ref workflow-quickstart.md >}}) | Orchestrate logic for messaging, state management, and failure handling. |
|
| [Workflow]({{< ref workflow-quickstart.md >}}) | Orchestrate business workflow activities in long running, fault-tolerant, stateful applications. |
|
||||||
|
|
|
@ -12,7 +12,7 @@ The workflow building block is currently in **alpha**.
|
||||||
|
|
||||||
Let's take a look at the Dapr [Workflow building block]({{< ref workflow >}}). In this Quickstart, you'll create a simple console application to demonstrate Dapr's workflow programming model and the workflow management APIs.
|
Let's take a look at the Dapr [Workflow building block]({{< ref workflow >}}). In this Quickstart, you'll create a simple console application to demonstrate Dapr's workflow programming model and the workflow management APIs.
|
||||||
|
|
||||||
The `order-processor` console app starts and manages the lifecycle of the `OrderProcessingWorkflow` workflow that stores and retrieves data in a Dapr state store. The workflow consists of four workflow activities, or tasks:
|
The `order-processor` console app starts and manages the lifecycle of the `OrderProcessingWorkflow` workflow that stores and retrieves data in a state store. The workflow consists of four workflow activities, or tasks:
|
||||||
- `NotifyActivity`: Utilizes a logger to print out messages throughout the workflow
|
- `NotifyActivity`: Utilizes a logger to print out messages throughout the workflow
|
||||||
- `ReserveInventoryActivity`: Checks the state store to ensure that there is enough inventory for the purchase
|
- `ReserveInventoryActivity`: Checks the state store to ensure that there is enough inventory for the purchase
|
||||||
- `ProcessPaymentActivity`: Processes and authorizes the payment
|
- `ProcessPaymentActivity`: Processes and authorizes the payment
|
||||||
|
@ -20,9 +20,9 @@ The `order-processor` console app starts and manages the lifecycle of the `Order
|
||||||
|
|
||||||
In this guide, you'll:
|
In this guide, you'll:
|
||||||
|
|
||||||
- Run the order processor application.
|
- Run the `order-processor` application.
|
||||||
- Start the workflow and watch the workflow activites/tasks execute.
|
- Start the workflow and watch the workflow activites/tasks execute.
|
||||||
- Unpack the workflow logic and the workflow activities and how they're represented in the code.
|
- Review the workflow logic and the workflow activities and how they're represented in the code.
|
||||||
|
|
||||||
<img src="/images/workflow-quickstart-overview.png" width=800 style="padding-bottom:15px;">
|
<img src="/images/workflow-quickstart-overview.png" width=800 style="padding-bottom:15px;">
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ In the terminal, start the order processor app alongside a Dapr sidecar:
|
||||||
dapr run --app-id order-processor dotnet run
|
dapr run --app-id order-processor dotnet run
|
||||||
```
|
```
|
||||||
|
|
||||||
This starts the `order-processor` ID and triggers the workflow activities.
|
This starts the `order-processor` app with unique workflow ID and runs the workflow activities.
|
||||||
|
|
||||||
Expected output:
|
Expected output:
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ Expected output:
|
||||||
|
|
||||||
### What happened?
|
### What happened?
|
||||||
|
|
||||||
When you ran `dapr run dotnet run`:
|
When you ran `dapr run --app-id order-processor dotnet run`:
|
||||||
|
|
||||||
1. A unique order ID for the workflow is generated (in the above example, `6d2abcc9`) and the workflow is scheduled.
|
1. A unique order ID for the workflow is generated (in the above example, `6d2abcc9`) and the workflow is scheduled.
|
||||||
1. The `NotifyActivity` workflow activity sends a notification saying an order for 10 cars has been received.
|
1. The `NotifyActivity` workflow activity sends a notification saying an order for 10 cars has been received.
|
||||||
|
@ -120,7 +120,7 @@ When you ran `dapr run dotnet run`:
|
||||||
#### `order-processor/Program.cs`
|
#### `order-processor/Program.cs`
|
||||||
|
|
||||||
In the application's program file:
|
In the application's program file:
|
||||||
- The unique order ID is generated
|
- The unique workflow order ID is generated
|
||||||
- The workflow is scheduled
|
- The workflow is scheduled
|
||||||
- The workflow status is retrieved
|
- The workflow status is retrieved
|
||||||
- The workflow and the workflow activities it invokes are registered
|
- The workflow and the workflow activities it invokes are registered
|
||||||
|
@ -258,6 +258,13 @@ The `Activities` directory holds the four workflow activities used by the workfl
|
||||||
|
|
||||||
{{< /tabs >}}
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
## Watch the demo
|
||||||
|
|
||||||
|
Watch [this video to walk through the workflow .NET demo](https://youtu.be/BxiKpEmchgQ?t=2564):
|
||||||
|
|
||||||
|
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/BxiKpEmchgQ?start=2564" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
||||||
|
|
||||||
|
|
||||||
## Tell us what you think!
|
## Tell us what you think!
|
||||||
We're continuously working to improve our Quickstart examples and value your feedback. Did you find this Quickstart helpful? Do you have suggestions for improvement?
|
We're continuously working to improve our Quickstart examples and value your feedback. Did you find this Quickstart helpful? Do you have suggestions for improvement?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue