Skip to content

Instantly share code, notes, and snippets.

@mikhailshilkov
Created December 7, 2018 11:37
Show Gist options
  • Save mikhailshilkov/e08067b63464a07519df2535e00f00f2 to your computer and use it in GitHub Desktop.
Save mikhailshilkov/e08067b63464a07519df2535e00f00f2 to your computer and use it in GitHub Desktop.
[FunctionName("SequentialWorkflow")]
public static async Task Sequential([OrchestrationTrigger] DurableOrchestrationContext context)
{
var conf = await context.CallActivityAsync<ConfTicket>("BookConference", "ServerlessDays");
try
{
var itinerary = MakeItinerary(/* ... */);
await context.CallActivityAsync("BookFlight", itinerary);
}
catch (FunctionFailedException)
{
var alternativeItinerary = MakeAnotherItinerary(/* ... */);
await context.CallActivityAsync("BookFlight", alternativeItinerary);
}
await context.CallActivityAsync("BookHotel", flight.Dates);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment