diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-workflow.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-workflow.md index 4ffe64cc0..a6d29ce3f 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-workflow.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-workflow.md @@ -11,9 +11,7 @@ Now that you've read about [the workflow building block]({{< ref workflow-overvi - Use the a worfklow component - Configure or register a workflow component. -## Built-in workflow vs external workflows - -When you run `dapr init`, Dapr creates a default built-in workflow component. This component is written in Go and implements workflow instances as actors to promote placement and scalability. +When you run `dapr init`, Dapr creates a default workflow runtime. This component is written in Go and implements workflow instances as actors to promote placement and scalability. [Insert HL diagram] diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-overview.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-overview.md index 42418daf8..9d8bc5b0c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-overview.md @@ -6,29 +6,56 @@ weight: 1000 description: "Overview of the workflow building block" --- -With workflows, you can orchestrate tasks or business logic within your application, making them reliable and restartable. Workflows provide a programming model for authoring code that abstracts away the complexities of messaging, state management, and failure handling. +{{% alert title="Note" color="primary" %}} +The Workflow building block is currently in alpha state supporting .NET. +{{% /alert %}} -## Workflow building block +The Dapr Workflow building block strives to make orchestrating logic for messaging, state management, and failure handling across various microservices easier for developers. Prior to adding workflows to Dapr, you'd often need to build ad-hoc workflows behind-the-scenes in order to bridge that gap. -The workflow building block: +The durable, resilient Dapr Workflow building block: - Provides a workflow API for running workflows -- An built-in workflow runtime to write Dapr workflows (of type workflow.dapr) -- Integrates with various workflow runtimes as components, for example Temporal workflows. +- Offers a built-in workflow runtime to write Dapr workflows (of type `workflow.dapr`) +- Integrates with various workflow runtimes as components (for example, Temporal workflows) -*To Do:* -- *Add diagram of how workflow API works?* -- *Add explaination of how the API works* -- *[Reference](https://docs.dapr.io/developing-applications/building-blocks/service-invocation/service-invocation-overview/)* +The Workflow building block can assist with scenarios like: +- Order processing involving inventory management, payment systems, shipping, etc. +- HR onboarding workflows coordinating tasks across multiple departments and participatns +- Orchestrating the roll-out of digital menu updates in a national restaurant chain +- Image processing workflows involving API-based classification and storage ---- +## How it works + +The Dapr Workflow engine runs in the Dapr sidecar and consists of: +- SDKs for authoring workflows in code, using any language +- APIs for managing workflows (start, query, suspend/resume, terminate) + +The workflow engine is internally powered by Dapr's actor runtime. In the following diagram demonstrates the Dapr Workflow architecture in Kubernetes mode: + +Diagram showing how the workflow architecture works in Kubernetes mode + +Essentially, to use the Dapr Workflow building block, you write workflow code in your application using the SDK and connect to the sidecar using gRPC stream. + +Notice that the engine itself is embedded directly into the sidecar and implemented by the `durabletask-go` framework library. This framework allows you to swap out different storage providers, including a storage provider created specifically for Dapr that leverages internal actors behind the scenes. Since Dapr Workflow uses actors, you can store workflow state in variety of Dapr-supported state stores, like Redis, CosmosDB, etc. ## Features -Start, Terminate and X any workflow +### HTTP/gRPC API calls to start or terminate any workflow +Once you create an application with workflow code and run it with Dapr, you can make HTTP/gRPC calls to Dapr to run specific tasks/workflows that reside in the application. Each individual workflow can be started or terminated through a POST request. + +You can also get information on the workflow (even if it has been terminated or it finished naturally) through a GET request. This GET request will send back information, such as: +- The instance ID of the workflow +- The time that the run started +- The current running status, whether that be “Running”, “Terminated”, or “Completed” + +## Watch the demo + +Watch [this video for an overview on Dapr Workflows](https://youtu.be/s1p9MNl4VGo?t=131): + + ## Next steps - [Learn how to set up a workflow]({{< ref howto-workflow.md >}}) -- [Supported workflows]({{< ref supported-workflows.md >}}) +- [Supported workflows]({{< ref supported-workflows.md >}}) \ No newline at end of file diff --git a/daprdocs/static/images/workflow-overview/workflows-architecture-k8s.png b/daprdocs/static/images/workflow-overview/workflows-architecture-k8s.png new file mode 100644 index 000000000..394891e05 Binary files /dev/null and b/daprdocs/static/images/workflow-overview/workflows-architecture-k8s.png differ