ITask<C extends WorkflowContext<WorkflowResult>> class abstract

Base interface for domain-agnostic, chainable tasks. C allows users to provide their own specialized WorkflowContext.

Implementers

Constructors

ITask()

Properties

condition → bool Function(C)
Optional condition to determine if this node should be skipped.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

execute(C context) → Future<void>
Execute the task's logic using the domain-specific context.
fanIn(ITask<C> next) → ITask<C>
Fan-in: return to a single flow after parallel execution.
fanOut(ITaskExecutableCollection<C> tasks) → ITask<C>
Fan-out: run multiple independent tasks in parallel using context C.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onFailure(ITask<C> fallback) → ITask<C>
Fallback task if the execution of this specific node throws an exception.
repeatUntil(bool condition(C), {required int maxAttempts}) → ITask<C>
Repeat the current task until a condition in the context C is met.
then(ITask<C> next) → ITask<C>
Sequentially chain another task. The next task must accept the same context type.
thenSwitch(ITaskCollection<C> tasks) → ITask<C>
Conditional branching within the same context type.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited