Interface StepDescriptor
interface StepDescriptor {
name: StepName;
retryBudget: number;
retryOnAbnormalTermination: boolean;
build(needs?: readonly unknown[]): Step;
policies(): readonly PolicyDescriptor[];
}
name: StepName;
retryBudget: number;
retryOnAbnormalTermination: boolean;
build(needs?: readonly unknown[]): Step;
policies(): readonly PolicyDescriptor[];
}
Properties
Readonlyname
The step's name, unique in its workflow.
Readonlyretry Budget
retryBudget: number
How many times the step may be retried after its first attempt: 0 when the workflow says nothing.
Readonlyretry On Abnormal Termination
retryOnAbnormalTermination: boolean
Whether an attempt that ends in an abnormal termination is retried while
the retry budget lasts: true when the workflow says nothing.
Methods
build
-
Builds the step for one attempt, as a new object, giving its constructor
needs, what its constructor's requests were answered with, in order.Parameters
- needs: readonly unknown[] = []
Returns Step
policies
-
The step policies attached to the step, in the order their hooks are looked up.
Returns readonly PolicyDescriptor[]
How a workflow describes one of its steps to the executor: its name, its retries, its step policies, and how to build it for an attempt. The executor reads it and never anything else about the step.
Only itinera makes one, for each step a workflow lists with
@withStepor its builder: an object written by hand, with the same members, is not a step descriptor and does not compile where one is expected.