Skip to content

dag-core / Exports / TaskRunStateMachine

Class: TaskRunStateMachine

Finite state machine for task run status transitions. Enforces valid transitions (including retry from failed) and emits domain events.

Table of contents

Constructors

Methods

Constructors

constructor

new TaskRunStateMachine(): TaskRunStateMachine

Returns

TaskRunStateMachine

Methods

transition

transition(currentStatus, event): TResult<ITaskRunTransitionValue, IDagError>

Parameters

NameType
currentStatusTTaskRunStatus
eventTTaskRunTransitionEvent

Returns

TResult<ITaskRunTransitionValue, IDagError>

Defined in

state-machines/task-run-state-machine.ts:61

Released under the MIT License.