Exemplo n.º 1
0
        public async Task <PendingWorkflow> DispatchStartableWorkflowAsync(StartableWorkflow startableWorkflow, object?input, CancellationToken cancellationToken = default)
        {
            var pendingWorkflow = new PendingWorkflow(startableWorkflow.WorkflowInstance.Id, startableWorkflow.ActivityId);

            await ExecutePendingWorkflowAsync(pendingWorkflow, input, cancellationToken);

            return(pendingWorkflow);
        }
Exemplo n.º 2
0
 public async Task DispatchPendingWorkflowAsync(PendingWorkflow pendingWorkflow, object?input, CancellationToken cancellationToken = default) =>
 await _workflowInstanceDispatcher.DispatchAsync(new ExecuteWorkflowInstanceRequest(pendingWorkflow.WorkflowInstanceId, pendingWorkflow.ActivityId, input), cancellationToken);
Exemplo n.º 3
0
 public async Task ExecutePendingWorkflowAsync(PendingWorkflow pendingWorkflow, object?input = default, CancellationToken cancellationToken = default) =>
 await _workflowInstanceExecutor.ExecuteAsync(pendingWorkflow.WorkflowInstanceId, pendingWorkflow.ActivityId, input, cancellationToken);