Skip to content

Instantly share code, notes, and snippets.

@gled4er
Created November 28, 2017 05:52
Show Gist options
  • Save gled4er/0c0852fdc86bae997112df5459ac1455 to your computer and use it in GitHub Desktop.
Save gled4er/0c0852fdc86bae997112df5459ac1455 to your computer and use it in GitHub Desktop.
Sub-Orchestrator
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
namespace DurableFunc
{
public static class HelloWorld
{
[FunctionName("HelloWorld")]
public static async Task<List<string>> Run([OrchestrationTrigger] DurableOrchestrationContext context)
{
var list = new List<string>
{
$"{await context.CallActivityAsync<string>("Hello", "Tokyo")}. The temperature is {await context.CallSubOrchestratorAsync<string>("TemperatureService", "Tokyo")}°C",
$"{await context.CallActivityAsync<string>("Hello", "Seattle")}. The temperature is {await context.CallSubOrchestratorAsync<string>("TemperatureService", "Seattle")}°C",
$"{await context.CallActivityAsync<string>("Hello", "London")}. The temperature is {await context.CallSubOrchestratorAsync<string>("TemperatureService", "London")}°C"
};
return list;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment