Skip to content

Instantly share code, notes, and snippets.

@KevinDJones
Created October 24, 2018 14:49
Show Gist options
  • Save KevinDJones/82b6ac96ecb486025976c6e3d129f91c to your computer and use it in GitHub Desktop.
Save KevinDJones/82b6ac96ecb486025976c6e3d129f91c to your computer and use it in GitHub Desktop.
[FunctionName("O_SendMessage")]
public static async Task SendMessageOrchestrator(
[OrchestrationTrigger] DurableOrchestrationContextBase context,
ILogger log)
{
MessageInput messageInput = context.GetInput<MessageInput>();
string smsKey = await context.CallActivityAsync<string>("A_SaveTwilioMapping", context.InstanceId);
messageInput.SmsKey = smsKey;
await context.CallActivityAsync<object>("A_SendTwilioText", messageInput);
string status = await context.WaitForExternalEvent<string>("TwilioCallback");
log.LogWarning($"Got status from Twilio: {status}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment