I have 2 Azure Functions - Powershell. One will Resume a PowerBI Embedded Capacity and the other will Pause it.
Then I have 1 Azure Function - C# that has to run once the PowerBI Embedded Capacity is running.
So in order to do that I will need an Orchestrator function that does the following:
- Await Powershell function until the PowerBI Embedded is running
- Await C# function to do some tasks
- Await Powershell function to Pause PowerBI Embedded
I was looking into this code but I guess this will work only when all your functions are C# and within the same Function App. Because I have C# and Powershell I have 2 Function Apps.
[FunctionName("E1_HelloSequence")]
public static async Task<List<string>> Run(
[OrchestrationTrigger] IDurableOrchestrationContext context)
{
var outputs = new List<string>();
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Tokyo"));
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Seattle"));
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello_DirectInput", "London"));
// returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
return outputs;
}
Any clue?