Skip to content

Instantly share code, notes, and snippets.

@dariuszparzygnat
Created December 10, 2019 21:47
Show Gist options
  • Save dariuszparzygnat/0958dff578421c02f4efe62f07533881 to your computer and use it in GitHub Desktop.
Save dariuszparzygnat/0958dff578421c02f4efe62f07533881 to your computer and use it in GitHub Desktop.
[FunctionName("OrchestrationFunction")]
public static async Task<string> OrchestrationStart(
[OrchestrationTrigger] IDurableOrchestrationContext context, ILogger logger)
{
var result = "";
var input = context.GetInput<string>();
try
{
result = await context.CallActivityAsync<string>("CreateMessage", input);
await context.CallActivityAsync("SendMessageToQueue", result);
}
catch (Exception ex)
{
logger.LogError("Something went wrong", ex);
return string.Empty;
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment