Skip to main content

Module guards

Module guards 

Source
Expand description

Shared preconditions for prepare_event: the checks that decide whether an event may touch a step at all, before anything is folded.

Functions§

check_attempt
Reject an event whose attempt is not the step’s current one: already_terminal for a past attempt, illegal_transition for a future one.
check_legal
Reject the edge step.status → event.status when the state machine has no such edge (illegal_transition).
require_kernel_state
The kernel state, or invalid_event when absent (only started may omit it).
require_step
The open step the event names, or unknown_step; illegal_transition when its kind is not kind.
retry_delay_ms
The delay_ms (milliseconds) a retrying event carries in its payload object; 0 when there is no payload or no delay_ms. Errors with invalid_event on any other shape.
set_status
Set the status of an open step; a no-op for an unknown id.