quickstarts/tutorials/workflow/java/workflow-management
salaboy 4cc708ba91 fixing comments
Signed-off-by: salaboy <Salaboy@gmail.com>
2025-08-18 11:48:36 +01:00
..
src adding management example 2025-08-18 11:48:36 +01:00
README.md fixing comments 2025-08-18 11:48:36 +01:00
pom.xml adding management example 2025-08-18 11:48:36 +01:00
workflowmanagement.http adding management example 2025-08-18 11:48:36 +01:00

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 WorkflowManagementRestController.java file in the tutorials/workflow/java/workflow-management/ 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

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

  2. Build and run the project using Maven.

    mvn spring-boot:test-run
    
  3. Use the first POST request in the workflowmanagement.http file to start the workflow.

  4. 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.
  5. Stop the application by pressing Ctrl+C.