WorkflowExecution class
Represents a running instance of a workflow.
Maps 1:1 to the workflow_executions SQLite table.
Immutable value object with JSON serialization.
Constructors
- WorkflowExecution({required String workflowExecutionId, required String workflowId, ExecutionStatus status = const Pending(), int currentStep = 0, String? inputData, String? outputData, String? errorMessage, String? ttlExpiresAt, WorkflowGuarantee guarantee = WorkflowGuarantee.foregroundOnly, required String createdAt, required String updatedAt})
-
Creates a WorkflowExecution.
const
-
WorkflowExecution.fromJson(Map<
String, dynamic> json) -
Creates a WorkflowExecution from a JSON map.
factory
Properties
- createdAt → String
-
ISO-8601 timestamp when this execution was created.
final
- currentStep → int
-
Index of the current step being executed.
final
- errorMessage → String?
-
Error message if the execution failed, or
null.final - guarantee → WorkflowGuarantee
-
The execution guarantee level.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- inputData → String?
-
JSON-encoded input data, or
null.final - outputData → String?
-
JSON-encoded output data, or
null.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → ExecutionStatus
-
Current execution status.
final
- ttlExpiresAt → String?
-
ISO-8601 timestamp when this execution expires, or
null.final - updatedAt → String
-
ISO-8601 timestamp when this execution was last updated.
final
- workflowExecutionId → String
-
Unique identifier for this execution instance.
final
- workflowId → String
-
Reference to the parent workflow definition.
final
Methods
-
copyWith(
{String? workflowExecutionId, String? workflowId, ExecutionStatus? status, int? currentStep, String? inputData, String? outputData, String? errorMessage, String? ttlExpiresAt, WorkflowGuarantee? guarantee, String? createdAt, String? updatedAt}) → WorkflowExecution - Creates a copy with optional field overrides.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes this execution to a JSON map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override