Method RunAsync
RunAsync(string, IReadOnlyDictionary<string, string>, OrchestrationOptions, string, CancellationToken)
Runs the workflow on an input.
public Task<WorkflowResult> RunAsync(string input, IReadOnlyDictionary<string, string> variables = null, OrchestrationOptions options = null, string runId = null, CancellationToken cancellationToken = default)
Parameters
inputstringThe workflow's input (
inputin its expressions).variablesIReadOnlyDictionary<string, string>Values the steps read as
vars.<name>; optional.optionsOrchestrationOptionsOrchestration options; approvals are always deferred to the run state.
runIdstringThe run's identifier; a new one when null.
cancellationTokenCancellationTokenA token to cancel the run.
Returns
- Task<WorkflowResult>
The workflow's result, which may have stopped for a person.
Exceptions
- InvalidOperationException
Thrown when the workflow is not valid; the message lists every fault.