Method RunAsync
Last update: 19.06.2026Namespace: Phoenix.ComponentAPI
Assembly: Phoenix.ComponentAPI.dll
RunAsync(IReadOnlyDictionary<string, VariableState>, VariableValueScope, CancellationToken)
Tells this harness to run.
Task RunAsync(IReadOnlyDictionary<string, VariableState> inputs, VariableValueScope outputs, CancellationToken cancellation)
Parameters
inputs IReadOnlyDictionary<string, VariableState>
The inputs to evaluate. All inputs for the harness will always be sent.
outputs VariableValueScope
The dictionary to fill up with outputs. The dictionary passed will be pre-filled in with all the output variables, their default values, with all the states set to invalid. Most harnesses should always return all outputs on a successful run as true. The infrastructure supports returning partial results for failed runs, however not all tools within the framework currently support this.
cancellation CancellationToken
A cancellation token that will indicate if the component has been halted.
Returns
A Task indicating completion
Remarks
If you want to save any Phoenix.ModelCenter.Common.Types.FileValue objects passed here for later use, you must
Phoenix.ModelCenter.Common.Types.FileValue.Clone them. The preferred way to do this is to use
Phoenix.ModelCenter.Common.Types.VariableValueScope.CloneFrom(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,Phoenix.ModelCenter.Common.Types.VariableState}})
Exceptions
This method may throw any exception on failure.