Exemplo n.º 1
0
        public static async Task TriggerOrchestrator(
            [ServiceBusTrigger(Constants.QueueName, Connection = Constants.ingressConnectionString)] OrchestrationActionModel myQueueItem,
            ILogger log,
            [DurableClient] IDurableOrchestrationClient durableOrchestrationClient)
        {
            log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");

            //Start a new orchestrator - send service bus message as input data
            var instanceId = await durableOrchestrationClient.StartNewAsync(Constants.DurableOrchestrator, null, myQueueItem);

            //Log the instance Id - this Id can be used to track the results of the orchestration run
            log.LogInformation($"Orchestrator instance created with Id: {instanceId}");
        }
Exemplo n.º 2
0
 public OrchestrationResultModel DeleteInfrastructure([ActivityTrigger] OrchestrationActionModel orchestrationAction, ILogger log)
 {
     //Call your orchestration functions here to delete your instances
     return(orchestrationAction.CreateSuccessResult(null));
 }
Exemplo n.º 3
0
 public OrchestrationResultModel CreateInfrastructure([ActivityTrigger] OrchestrationActionModel orchestrationAction, ILogger log)
 {
     //Call your orchestration functions here to create your instances and generate a url for a user to log in to
     return(orchestrationAction.CreateSuccessResult(null));
 }
Exemplo n.º 4
0
 public OrchestrationResultModel Update([ActivityTrigger] OrchestrationActionModel orchestrationAction, ILogger log)
 {
     //Call your orchestration functions here to create your instances and generate a url for a user to log in to
     return(orchestrationAction.CreateSuccessResult(new Uri("http://mycoolwebsite.net")));
 }