quickstarts/tutorials/workflow/python/workflow-management
Marc Duiker c71f2dcfa2
Update tutorials/workflow/python/workflow-management/README.md
Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
2025-05-20 08:00:34 +02:00
..
workflow_management Add univorn dependency 2025-05-14 11:04:05 +00:00
README.md Update tutorials/workflow/python/workflow-management/README.md 2025-05-20 08:00:34 +02:00
dapr.yaml Add workflow management 2025-05-08 11:59:26 +02:00
makefile Add workflow management 2025-05-08 11:59:26 +02:00
workflowmanagement.http Add workflow management 2025-05-08 11:59:26 +02:00

README.md

Workflow Management

This tutorial demonstrates the various APIs to manage a workflow instance, these methods include:

  • Scheduling a workflow instance
  • Getting a workflow instance state
  • Suspending a workflow instance
  • Resuming a workflow instance
  • Terminating a workflow instance
  • Purging a workflow instance

For more information on workflow management, see the Dapr docs.

Inspect the code

Open the app.py file in the tutorials/workflow/python/workflow-management/workflow_-_management/workflow_management folder. This file contains the endpoint definitions that use the workflow management API. The workflow that is being managed is named never_ending_workflow and is a counter that will keep running once it's started.

Run the tutorial

  1. Use a terminal to navigate to the tutorials/workflow/python/workflow-management/workflow-management folder.

  2. Install the dependencies using pip:

    pip3 install -r requirements.txt
    
  3. Navigate one level back to the workflow-management folder and use the Dapr CLI to run the Dapr Multi-App run file

    ```bash
    

    dapr run -f .

    <!-- END_STEP -->
    
    
  4. Use the first POST request in the workflowmanagement.http file to start the workflow.

  5. Use other requests in the workflowmanagement.http file 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.
  6. Stop the Dapr Multi-App run process by pressing Ctrl+C.