Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| WorkflowManagement | ||
| README.md | ||
| dapr.yaml | ||
| makefile | ||
| workflowmanagement.http | ||
README.md
Workflow Management
This tutorial demonstrates the various APIs to manage a workflow instance, these methods include:
- Scheduling a workflow instance
- Getting the workflow instance state
- Suspending the workflow instance
- Resuming the workflow instance
- Terminating the workflow instance
- Purging the workflow instance
For more information on workflow management, see the Dapr docs.
Inspect the code
Open the Program.cs file in the tutorials/workflow/csharp/workflow-management/WorkflowManagement folder. This file contains the endpoint definitions that use the workflow management API. The workflow that is being managed is named NeverEndingWorkflow and is a counter that will keep running once it's started.
Run the tutorial
-
Use a terminal to navigate to the
tutorials/workflow/csharp/workflow-managementfolder. -
Build the project using the .NET CLI.
dotnet build ./WorkflowManagement/ -
Use the Dapr CLI to run the Dapr Multi-App run file
```bashdapr run -f .
<!-- END_STEP --> -
Use the first POST request in the
workflowmanagement.httpfile to start the workflow. -
Use other requests in the
workflowmanagement.httpfile to perform other actions on the workflow, such as:- Getting the workflow instance state.
- Suspending & resuming the workflow instance.
- Terminating the workflow instance.
- Purging the workflow instance.
-
Stop the Dapr Multi-App run process by pressing
Ctrl+C.