Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewState ¶
NewState creates an initial execution State from a workflow definition and the caller-supplied inputs and environment variables. Nil maps are converted to empty maps. Workflow input defaults are applied for any field not present in inputs.
func Run ¶
func Run(ctx context.Context, wf *model.Workflow, inputs map[string]any, env map[string]string, reg participant.Registry, hub *eventhub.Hub) (any, error)
Run parses, initialises state for, and executes a workflow definition. inputs contains the caller-supplied workflow input values (may be nil). env contains process environment variables made available as env.* (may be nil). reg maps each participant name to its Participant implementation. hub is the event hub used by emit and wait.event steps; if nil a new in-memory hub is created for the duration of this execution.
The returned value is the resolved workflow output (a plain value, a map[string]any, or nil when no output is defined and no steps succeeded).
Types ¶
This section is empty.