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); }
public async Task DispatchPendingWorkflowAsync(PendingWorkflow pendingWorkflow, object?input, CancellationToken cancellationToken = default) => await _workflowInstanceDispatcher.DispatchAsync(new ExecuteWorkflowInstanceRequest(pendingWorkflow.WorkflowInstanceId, pendingWorkflow.ActivityId, input), cancellationToken);
public async Task ExecutePendingWorkflowAsync(PendingWorkflow pendingWorkflow, object?input = default, CancellationToken cancellationToken = default) => await _workflowInstanceExecutor.ExecuteAsync(pendingWorkflow.WorkflowInstanceId, pendingWorkflow.ActivityId, input, cancellationToken);