public static async Task CancelAsync(BaseWorkflowService context, string id) { var ctx = await context.client.GetOrchestrationStateAsync(id); await context.client.RaiseEventAsync(ctx.OrchestrationInstance, "__CANCEL", "cancel"); }
public static async Task <WorkflowResult <TOutput> > GetResultAsync(BaseWorkflowService context, string id) { var ctx = await context.client.GetOrchestrationStateAsync(id); return(new WorkflowResult <TOutput>(ctx)); }
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); }