forked from Azure/azure-functions-durable-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HelloSequence.fs
24 lines (17 loc) · 823 Bytes
/
HelloSequence.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
namespace VSSample
open Microsoft.Azure.WebJobs
open FSharp.Control.Tasks
module HelloSequence =
[<FunctionName("E1_HelloSequence")>]
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")
// returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
return [hello1; hello2; hello3]
}
[<FunctionName("E1_SayHello")>]
let SayHello([<ActivityTrigger>] name) =
sprintf "Hello %s!" name