Пример #1
0
        public static async Task CancelAsync(BaseWorkflowService context, string id)
        {
            var ctx = await context.client.GetOrchestrationStateAsync(id);

            await context.client.RaiseEventAsync(ctx.OrchestrationInstance, "__CANCEL", "cancel");
        }
Пример #2
0
        public static async Task <WorkflowResult <TOutput> > GetResultAsync(BaseWorkflowService context, string id)
        {
            var ctx = await context.client.GetOrchestrationStateAsync(id);

            return(new WorkflowResult <TOutput>(ctx));
        }
Пример #3
0
        public static async Task <string> CreateInstanceAsync(BaseWorkflowService context, TInput input, DateTime at)
        {
            var o = await context.client.CreateScheduledOrchestrationInstanceAsync(typeof(TWorkflow), input, at);

            return(o.InstanceId);
        }