engine

package
v1.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewState

func NewState(wf *model.Workflow, inputs map[string]any, env map[string]string) *cel.State

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).

func WithBaseCWD

func WithBaseCWD(ctx context.Context, cwd string) context.Context

WithBaseCWD stores the base working directory used by exec participants when neither participant.cwd nor defaults.cwd is defined.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL