Readonly
contractsContract definitions for the resumable's event interface. Defines accepted events, emitted events, and service integrations.
Self contract defining initialization input and completion output structures.
Service contracts defining external service interfaces.
Readonly
executionunitsComputational cost metric for workflow operations
Readonly
handlerVersioned handler map for processing workflow events.
Readonly
sourceSource identifier from the first registered machine
Readonly
spanOpenTelemetry span configuration for observability
Readonly
syncResource manager for state synchronization and memory access
Optional
Readonly
systemOptional domains for routing system error events
The contract-defined domain for the handler
Memory interface for state persistence and retrieval
Whether this resumable requires resource locking for concurrent safety
Schema configuration for system error events.
Defines the structure and routing for error events emitted when unexpected errors occur during event handling. System errors are sent to the workflow initiator to signal terminal failures that cannot be automatically recovered.
The Zod schema used for validating data associated with this record
The type identifier for this record
Executes the workflow handler for an incoming event.
Processes initialization events or service responses through the versioned handler, manages state persistence, tracks expected events, and generates output events. Workflows in 'done' status ignore subsequent events without processing.
For violation errors (transaction, config, contract), the error is thrown to enable retry mechanisms. For non-violation errors, system error events are emitted to the workflow initiator, and the workflow enters a terminal failure state.
The incoming event triggering handler execution
Optional
opentelemetry: ArvoEventHandlerOpenTelemetryOptionsOptional OpenTelemetry configuration for tracing
Object containing emitted events from the handler or system errors
Protected
validateValidates incoming event against self or service contracts.
Resolves the appropriate contract (self for initialization, service for responses), validates schema compatibility, and ensures event data matches contract requirements.
See validateInputEvent for more infromation
Optional
span: Span
ArvoResumable complements ArvoOrchestrator by providing imperative handler functions for orchestration logic instead of declarative state machines. While ArvoOrchestrator excels at complex static workflows with deterministic branching, ArvoResumable handles dynamic orchestrations where branching logic depends on runtime context and event data.
Use this for dynamic orchestrations with context-dependent branching or when preferring imperative programming patterns over state machines.