Skip to content
A simple demo of how Durable Functions can be used for a workflow
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
csharp adding a sample for the local settings with dev storage account enabled May 6, 2019

This repository contains a simple Durable Functions workflow demo, written in C#, F# and JavaScript.

Getting Started

  1. Clone or download the coode and open the folder of the language you want to use
  2. Open the folder in VS Code
  1. Edit the local.settings.json file to set the AzureWebJobsStorage connection string properly
  1. Start the debugger

How to run the demo

When the demo functions have started up they will consist of 3 API endpoints:

  • /api/start/{input}
    • Starts a new workflow for the input that you provide, eg: /api/start/aaron
  • /api/check/{input}
    • Checks the workflow status for the input you started, eg: /api/check/aaron
    • Returns a JSON object showing all workflows in the storage account and the ones that match the provided input
  • /api/stop/{input}
    • Sends an event to the workflow manager to stop the workflow for the input provided, eg: /api/stop/aaron
    • Returns a JSON object with the instance that was stopped or 404 if the input didn't match a workflow

How it works

The demo creates 4 Azure functions, 3 of which have a HttpTrigger binding and 1 OrchestrationTrigger binding.

Each HTTP Function also receives the OrchestrationClient input which allows them to interact with Durable Functions.

The Workflow Function will be triggered by the StartWorkflow function and then it will wait for an external event to be triggered. While it's waiting the function is in a 'sleep' state and not consuming any resources, but when the event is triggered it will start at the point it had run up to and continue on (in this case run to completion). The event is triggered in the StopWorkflow Function.


MIT Aaron Powell - 2019

You can’t perform that action at this time.