Created
December 19, 2018 23:01
-
-
Save mikhailshilkov/1c7d9df2ae5bf8c98f0503dde85b71a9 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
// 1. Simple sequencing of activities | |
let Run([<OrchestrationTrigger>] context: DurableOrchestrationContext) = task { | |
let! hello1 = context.CallActivityAsync<string>("E1_SayHello", "Tokyo") | |
let! hello2 = context.CallActivityAsync<string>("E1_SayHello", "Seattle") | |
let! hello3 = context.CallActivityAsync<string>("E1_SayHello", "London") | |
return [hello1; hello2; hello3] | |
} | |
// 2. Parallel calls snippet | |
let tasks = Array.map (fun f -> context.CallActivityAsync<int64>("E2_CopyFileToBlob", f)) files | |
let! results = Task.WhenAll tasks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment