diff --git a/dotnet/samples/Durable/Workflow/ConsoleApps/01_SequentialWorkflow/README.md b/dotnet/samples/Durable/Workflow/ConsoleApps/01_SequentialWorkflow/README.md index 5327b8b178..4eb50e2662 100644 --- a/dotnet/samples/Durable/Workflow/ConsoleApps/01_SequentialWorkflow/README.md +++ b/dotnet/samples/Durable/Workflow/ConsoleApps/01_SequentialWorkflow/README.md @@ -47,7 +47,7 @@ The key feature of Durable Task Framework is **durability**: ## Environment Setup -See the [README.md](../README.md) file in the parent directory for information on configuring the environment, including how to install and run the Durable Task Scheduler. +See the [README.md](../../README.md) file in the parent directory for information on configuring the environment, including how to install and run the Durable Task Scheduler. ## Running the Sample diff --git a/dotnet/samples/Durable/Workflow/ConsoleApps/02_ConcurrentWorkflow/README.md b/dotnet/samples/Durable/Workflow/ConsoleApps/02_ConcurrentWorkflow/README.md index 6e40ab276d..e21f92f6de 100644 --- a/dotnet/samples/Durable/Workflow/ConsoleApps/02_ConcurrentWorkflow/README.md +++ b/dotnet/samples/Durable/Workflow/ConsoleApps/02_ConcurrentWorkflow/README.md @@ -49,7 +49,7 @@ This pattern is useful for: ## Environment Setup -See the [README.md](../README.md) file in the parent directory for information on configuring the environment. +See the [README.md](../../README.md) file in the parent directory for information on configuring the environment. ### Required Environment Variables diff --git a/dotnet/samples/Durable/Workflow/ConsoleApps/03_ConditionalEdges/README.md b/dotnet/samples/Durable/Workflow/ConsoleApps/03_ConditionalEdges/README.md index f636c4f288..f06e185f30 100644 --- a/dotnet/samples/Durable/Workflow/ConsoleApps/03_ConditionalEdges/README.md +++ b/dotnet/samples/Durable/Workflow/ConsoleApps/03_ConditionalEdges/README.md @@ -60,7 +60,7 @@ In this sample, the routing is based on the order ID: ## Environment Setup -See the [README.md](../README.md) file in the parent directory for information on configuring the environment, including how to install and run the Durable Task Scheduler. +See the [README.md](../../README.md) file in the parent directory for information on configuring the environment, including how to install and run the Durable Task Scheduler. ## Running the Sample diff --git a/dotnet/samples/Durable/Workflow/ConsoleApps/05_WorkflowEvents/README.md b/dotnet/samples/Durable/Workflow/ConsoleApps/05_WorkflowEvents/README.md index 00012c5afb..b519ec8d5c 100644 --- a/dotnet/samples/Durable/Workflow/ConsoleApps/05_WorkflowEvents/README.md +++ b/dotnet/samples/Durable/Workflow/ConsoleApps/05_WorkflowEvents/README.md @@ -70,7 +70,7 @@ Each executor emits custom events during execution: ## Prerequisites -- [Durable Task Scheduler](https://learn.microsoft.com/azure/azure-functions/durable/durable-task-scheduler) running locally or in Azure +- [Durable Task Scheduler](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-task-scheduler/durable-task-scheduler) running locally or in Azure - Set the `DURABLE_TASK_SCHEDULER_CONNECTION_STRING` environment variable (defaults to local emulator) ## Environment Setup diff --git a/dotnet/samples/Durable/Workflow/ConsoleApps/07_SubWorkflows/README.md b/dotnet/samples/Durable/Workflow/ConsoleApps/07_SubWorkflows/README.md index 4f7773dd03..f53bfb93c4 100644 --- a/dotnet/samples/Durable/Workflow/ConsoleApps/07_SubWorkflows/README.md +++ b/dotnet/samples/Durable/Workflow/ConsoleApps/07_SubWorkflows/README.md @@ -45,7 +45,7 @@ OrderProcessing (main workflow) ## How Sub-Workflows Work -For an introduction to sub-workflows and the `BindAsExecutor()` API, see the [Sub-Workflows foundational sample](../../../GettingStarted/Workflows/_Foundational/06_SubWorkflows). +For an introduction to sub-workflows and the `BindAsExecutor()` API, see the [Sub-Workflows foundational sample](../../../../GettingStarted/Workflows/_Foundational/06_SubWorkflows). This durable sample extends the same pattern — the key difference is that each sub-workflow runs as a **separate orchestration instance** on the Durable Task Scheduler, providing independent checkpointing, fault tolerance, and hierarchical visualization in the DTS dashboard. diff --git a/dotnet/samples/Durable/Workflow/ConsoleApps/08_WorkflowHITL/README.md b/dotnet/samples/Durable/Workflow/ConsoleApps/08_WorkflowHITL/README.md index 01a62da53d..a58d69d6f2 100644 --- a/dotnet/samples/Durable/Workflow/ConsoleApps/08_WorkflowHITL/README.md +++ b/dotnet/samples/Durable/Workflow/ConsoleApps/08_WorkflowHITL/README.md @@ -62,7 +62,7 @@ await foreach (WorkflowEvent evt in run.WatchStreamAsync()) ## Environment Setup -See the [README.md](../README.md) file in the parent directory for information on configuring the environment, including how to install and run the Durable Task Scheduler. +See the [README.md](../../README.md) file in the parent directory for information on configuring the environment, including how to install and run the Durable Task Scheduler. ## Running the Sample diff --git a/dotnet/samples/Durable/Workflow/README.md b/dotnet/samples/Durable/Workflow/README.md new file mode 100644 index 0000000000..2b7103de50 --- /dev/null +++ b/dotnet/samples/Durable/Workflow/README.md @@ -0,0 +1,50 @@ +# Durable Workflow Samples + +This directory contains samples demonstrating how to build durable workflows using the Microsoft Agent Framework. + +## Environment Setup + +### Prerequisites + +- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) or later +- [Durable Task Scheduler](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-task-scheduler/durable-task-scheduler) running locally or in Azure + +### Running the Durable Task Scheduler Emulator + +To run the emulator locally using Docker: + +```bash +docker run -d -p 8080:8080 --name durabletask-emulator mcr.microsoft.com/durabletask/emulator:latest +``` + +Set the connection string environment variable to point to the local emulator: + +```bash +# Linux/macOS +export DURABLE_TASK_SCHEDULER_CONNECTION_STRING="AccountEndpoint=http://localhost:8080" + +# Windows (PowerShell) +$env:DURABLE_TASK_SCHEDULER_CONNECTION_STRING = "AccountEndpoint=http://localhost:8080" +``` + +## Samples + +### Console Apps + +| Sample | Description | +|--------|-------------| +| [01_SequentialWorkflow](ConsoleApps/01_SequentialWorkflow/) | Basic sequential workflow with ordered executor steps | +| [02_ConcurrentWorkflow](ConsoleApps/02_ConcurrentWorkflow/) | Fan-out/fan-in concurrent workflow execution | +| [03_ConditionalEdges](ConsoleApps/03_ConditionalEdges/) | Workflows with conditional routing between executors | +| [05_WorkflowEvents](ConsoleApps/05_WorkflowEvents/) | Publishing and subscribing to workflow events | +| [06_WorkflowSharedState](ConsoleApps/06_WorkflowSharedState/) | Sharing state across workflow executors | +| [07_SubWorkflows](ConsoleApps/07_SubWorkflows/) | Nested sub-workflow composition | +| [08_WorkflowHITL](ConsoleApps/08_WorkflowHITL/) | Human-in-the-loop workflow with approval gates | + +### Azure Functions + +| Sample | Description | +|--------|-------------| +| [01_SequentialWorkflow](AzureFunctions/01_SequentialWorkflow/) | Sequential workflow hosted in Azure Functions | +| [02_ConcurrentWorkflow](AzureFunctions/02_ConcurrentWorkflow/) | Concurrent workflow hosted in Azure Functions | +| [03_WorkflowHITL](AzureFunctions/03_WorkflowHITL/) | Human-in-the-loop workflow hosted in Azure Functions |