Signal<T> represents a value that Automate.ax materializes during execution. Triggers and actions return signals while the automation is still planning.
await them.
Operator families
Dependency and structure operators such as
dependentOn, withPrerequisites, scope, and group support every family. This distinction matters most for merge and race: merge accepts independent occurrence streams, while race chooses among alternatives that already share an activation boundary.
Planning declares the work
Automate.ax traverses an automation synchronously to register triggers, actions, and coordination. Property access and pure transforms describe how to derive values later.transform, and t to derive action inputs.
Dependencies control readiness
Line order doesn’t serialize actions. A declaration waits for the signals in its inputs and prerequisites.labeled; it doesn’t wait for starred. Use dependentOn to add dependencies to one value or withPrerequisites to apply them to a synchronous declaration section.
An action accepts a compatible signal as its complete input or at any nested plain-object or array node. Passing the signal creates the durable dependency.
Contexts identify occurrences
Each trigger occurrence starts a root context. Actions normally run in the closest context boundary containing their complete dependency chain. Cross-context operators create child boundaries:mergeemits each occurrence from independent input streams in its own child.correlatejoins selected keyed occurrences from independent roots.collect,funnel, andwindowcreate a child from a batch or burst.once,take, andrateLimitbound admission per partition.eachcreates a child for each array item.racecreates a child for its selected result.serializeadmits one occurrence-scoped work region at a time per partition.concurrentadmits a fixed number of active regions per partition.
withPrerequisites. Action context placement covers the planning rules.
Partitions coordinate repeated occurrences
Cross-context batching and timing need an explicit partition:keyByisolates occurrences by a customer, record, conversation, or other encoded key.globallyplaces every occurrence in one shared partition.
Signals emit, fail, or close
A signal terminates once:- Succeeded: emitted a value. Returning
nullorundefinedfrom an action still succeeds. - Failed: produced an automation error. Dependent actions skip; unrelated work can continue.
- Closed: produced no value because a route wasn’t selected.
outcome to turn every terminal state into a tagged value. Use onSuccess, onFailure, or onClose to declare work for one state.