Skip to content

@oona/vlo / host / foldEvent

Function: foldEvent() ​

foldEvent(ctx, workflow, run, at, event): Transition

Defined in: sdk/ts/sdk/src/host/refold.ts:48

One event → one write-set. The reducer runs here and nowhere else. Pure: nothing is journaled, the caller applies the returned transition.

Parameters ​

ctx ​

HostContext

workflow ​

Workflow

run ​

RunRef

at ​

FoldState

event ​

EventInput

Returns ​

Transition

Throws ​

ReducerFailed when the workflow's reducer throws; carries the trigger event.

Throws ​

IllegalEvent when the kernel refuses to prepare or reduce the event.