execute property

Future<T> Function() execute
final

Executes the operation for this step.

This is a nullary async function (takes no parameters) that performs the actual work. It returns a value of type T which will be passed to compensate if the step succeeds but needs to be rolled back.

If this function throws any exception, the step is considered failed and the saga enters compensation mode.

The return value T must be compatible with compensate's parameter type (enforced by Dart's type system through the generic T).

Implementation

final Future<T> Function() execute;