External events

In Durable Functions, it is possible to wait for an external event before proceeding with a workflow. This is especially helpful if you want to create an interactive flow, where you initiate a process in one place and have a requirement to wait for someone's decision. To raise an event, you can use the following function:

[FunctionName("Orchestration_Raise")]public static async Task Orchestration_Raise(  [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "start_raise/{id}/{event}")] HttpRequestMessage input,  string id,  string @event,  [OrchestrationClient] DurableOrchestrationClient starter){  await starter.RaiseEventAsync(id, @event, await input.Content.ReadAsStringAsync());}

Here, you can find an example of waiting ...

Get Hands-On Azure for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.