Dapr workflow makes it easy for developers to write business logic and integrations in a reliable way. Since Dapr workflows are stateful, they support long-running and fault-tolerant applications, ideal for orchestrating microservices. Dapr workflow works seamlessly with other Dapr building blocks, such as service invocation, pub/sub, state management, and bindings.
The durable, resilient Dapr Workflow capability:
Some example scenarios that Dapr Workflow can perform are:
With Dapr Workflow, you can write activities and then orchestrate those activities in a workflow. Workflow activities are:
Learn more about workflow activities.
In addition to activities, you can write workflows to schedule other workflows as child workflows. A child workflow has its own instance ID, history, and status that is independent of the parent workflow that started it, except for the fact that terminating the parent workflow terminates all of the child workflows created by it. Child workflow also supports automatic retry policies.
Learn more about child workflows.
Same as Dapr actors, you can schedule reminder-like durable delays for any time range.
Learn more about workflow timers and reminders
When you create an application with workflow code and run it with Dapr, you can call specific workflows that reside in the application. Each individual workflow can be:
Learn more about how manage a workflow using HTTP calls.
Dapr Workflow simplifies complex, stateful coordination requirements in microservice architectures. The following sections describe several application patterns that can benefit from Dapr Workflow.
Learn more about different types of workflow patterns
The Dapr Workflow authoring SDKs are language-specific SDKs that contain types and functions to implement workflow logic. The workflow logic lives in your application and is orchestrated by the Dapr Workflow engine running in the Dapr sidecar via a gRPC stream.
You can use the following SDKs to author a workflow.
Language stack | Package |
---|---|
Python | dapr-ext-workflow |
JavaScript | DaprWorkflowClient |
.NET | Dapr.Workflow |
Java | io.dapr.workflows |
Go | workflow |
Want to put workflows to the test? Walk through the following quickstart and tutorials to see workflows in action:
Quickstart/tutorial | Description |
---|---|
Workflow quickstart | Run a workflow application with four workflow activities to see Dapr Workflow in action |
Workflow Python SDK example | Learn how to create a Dapr Workflow and invoke it using the Python dapr-ext-workflow package. |
Workflow JavaScript SDK example | Learn how to create a Dapr Workflow and invoke it using the JavaScript SDK. |
Workflow .NET SDK example | Learn how to create a Dapr Workflow and invoke it using ASP.NET Core web APIs. |
Workflow Java SDK example | Learn how to create a Dapr Workflow and invoke it using the Java io.dapr.workflows package. |
Workflow Go SDK example | Learn how to create a Dapr Workflow and invoke it using the Go workflow package. |
Want to skip the quickstarts? Not a problem. You can try out the workflow building block directly in your application. After Dapr is installed, you can begin using workflows, starting with how to author a workflow.
Watch this video for an overview on Dapr Workflow: