quickstarts/tutorials/workflow/csharp/task-chaining
Marc Duiker 7214b5b414
Add workflow input and outputs to READMEs
Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
2025-04-14 12:58:16 +02:00
..
TaskChaining Use file based namespaces, make classes internal sealed 2025-04-01 12:30:07 +01:00
README.md Add workflow input and outputs to READMEs 2025-04-14 12:58:16 +02:00
chaining.http Update folder structure 2025-03-21 16:52:43 +01:00
dapr.yaml Fix paths for multi-app run 2025-04-01 13:35:07 +01:00

README.md

Task Chaining Pattern

This tutorial demonstrates how to chain multiple tasks together as a sequence in a workflow. For more information about the task chaining pattern see the Dapr docs.

Inspect the code

Open the ChainingWorkflow.cs file in the tutorials/workflow/csharp/task-chaining/TaskChaining folder. This file contains the definition for the workflow.

graph LR
   SW((Start
   Workflow))
   A1[Activity1]
   A2[Activity2]
   A3[Activity3]
   EW((End
   Workflow))
   SW --> A1
   A1 --> A2
   A2 --> A3
   A3 --> EW

Run the tutorial

  1. Use a terminal to navigate to the tutorials/workflow/csharp/task-chaining folder.

  2. Build the project using the .NET CLI.

    dotnet build ./TaskChaining/
    
  3. Use the Dapr CLI to run the Dapr Multi-App run file

    dapr run -f .
    
  4. Use the POST request in the chaining.http file to start the workflow.

    The input for the workflow is a string with the value This.

  5. Use the GET request in the chaining.http file to get the status of the workflow.

    The expected serialized output of the workflow is:

    "\"This is task chaining\""
    
  6. Stop the Dapr Multi-App run process by pressing Ctrl+C.