Created
December 7, 2018 11:37
-
-
Save mikhailshilkov/e08067b63464a07519df2535e00f00f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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