To get started with an orchestration, you need a host for it. In Durable Functions, that host is the orchestration client, which enables you to perform the following actions on an orchestration:
- Start it
- Terminate it
- Get its status
- Raise an event and pass it to an orchestration
The basic code for a client is pretty simple:
[FunctionName("Orchestration_Client")]public static async Task<string> Orchestration_Client( [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "start")] HttpRequestMessage input, [OrchestrationClient] DurableOrchestrationClient starter){ return await starter.StartNewAsync("Orchestration", await input.Content.ReadAsStringAsync());}
As you can see from the preceding code, we started an orchestration ...