WorkflowStem.EngineBehaviour behaviour (workflow_stem v0.2.0)

Copy Markdown View Source

Behaviour contract for stem engines.

Engines must be deterministic under sync: true execution, enabling reliable unit tests and debugging.

Summary

Callbacks

checkpoint(runtime)

@callback checkpoint(WorkflowStem.Types.runtime()) :: map()

get_state(runtime)

@callback get_state(WorkflowStem.Types.runtime()) :: WorkflowStem.Projection.t() | map()

handle_event(runtime, event, payload)

init(spec, runtime_context)

restore(spec, map, runtime_context)