Provides execution context for automation nodes including input data, workflow state, and execution environment.

Members

MemberKindDescription
ExecutionContext(string workflowId, string executionId)MethodInitializes a new instance of the ExecutionContext class. The ID of the workflow being executed. The unique ID for this execution instance.
string WorkflowIdPropertyGets the ID of the workflow being executed.
string ExecutionIdPropertyGets the unique ID for this execution instance.
DateTime StartTimePropertyGets the time when this execution context was created.
Dictionary<string, object> DataPropertyGets or sets the input data for the current node execution.
Dictionary<string, object> VariablesPropertyGets or sets the workflow variables accessible to all nodes.
Dictionary<string, object> MetadataPropertyGets or sets metadata about the execution environment.
List<object> PreviousResultsPropertyGets or sets the results from previous nodes in the workflow execution.
string UserIdPropertyGets or sets the user ID who initiated the workflow execution.
ExecutionPriority PriorityPropertyGets or sets the execution priority.
bool IsDebugModePropertyGets or sets a value indicating whether the execution is in debug mode.
TimeSpan? TimeoutPropertyGets or sets the maximum execution timeout.
ExecutionContext CreateChild(Dictionary<string, object> newData = null)MethodCreates a copy of the current execution context with optionally modified data. New data to replace the current data, or null to keep existing data. A new ExecutionContext instance with the specified modifications.
T GetData<T>(string key, T defaultValue = default)MethodGets a strongly typed value from the data dictionary. The type to cast the value to. The key to look up. The default value to return if the key is not found. The value cast to the specified type, or the default value.
void SetData(string key, object value)MethodSets a value in the data dictionary. The key to set. The value to set.
T GetVariable<T>(string key, T defaultValue = default)MethodGets a strongly typed variable value. The type to cast the value to. The key to look up. The default value to return if the key is not found. The variable value cast to the specified type, or the default value.
void SetVariable(string key, object value)MethodSets a workflow variable value. The key to set. The value to set.

Related