Class: WorkflowBuilder
The recording builder passed to the defineWorkflow callback.
Constructors
Constructor
new WorkflowBuilder(
autoIds):WorkflowBuilder
Parameters
autoIds
boolean
Returns
WorkflowBuilder
Properties
execution
readonlyexecution:PredicateMethods
$execution: run metadata.
json
readonlyjson:PredicateMethods
$json: the current item's JSON.
now
readonlynow:PredicateMethods
$now.
vars
readonlyvars:PredicateMethods
$vars: workflow variables.
Methods
aggregate()
aggregate(
options):NodeRef
internal:aggregate.
Parameters
options
Returns
code()
code(
options):NodeRef
internal:code. The code is a string (args.code), so it round-trips byte for byte.
Parameters
options
Returns
codeWorkflow()
codeWorkflow(
fn,options?):NodeRef
internal:code-workflow: run a tier-2 function of this project as a
durable child run. fn is a workflow() value (its export name is
resolved when the bundle is collected) or an export name.
Parameters
fn
string | DurableWorkflow<never, unknown>
options?
Returns
compareDatasets()
compareDatasets(
options):CompareRef
internal:compare-datasets.
Parameters
options
Returns
connect()
connect(
from,to,options?):void
An edge added outside after, for example a loop's return edge.
Parameters
from
to
string | NodeRef<unknown>
options?
Returns
void
dataTable()
dataTable(
options):NodeRef
internal:datatable.
Parameters
options
Returns
dedupe()
dedupe(
options):NodeRef
internal:dedupe.
Parameters
options
Returns
durableReferences()
durableReferences():
DurableRef[]
The wf.codeWorkflow calls that named a function.
Returns
edgeOrderIs()
edgeOrderIs(
order):void
Put data.edges in this exact order. Each entry names one edge, by id or,
for an edge without an id, by its position in declaration order; every edge
appears once. The lifter emits this when a stored definition's edge order
differs from the order the code declares its edges in.
Parameters
order
readonly (string | number)[]
Returns
void
filter()
filter(
options):NodeRef
internal:filter.
Parameters
options
Returns
finish()
finish(
key,document):Tier1Recording
The recording, once the callback has returned.
Parameters
key
string
document
Returns
http()
http(
options):NodeRef
internal:http.
Parameters
options
Returns
if()
if(
options):IfRef
internal:if.
Parameters
options
Returns
limit()
limit(
options):NodeRef
internal:limit.
Parameters
options
Returns
log()
log(
options):NodeRef
internal:log.
Parameters
options
Returns
loop()
loop(
options,body?):LoopRef
internal:loop. With a body callback, the nodes the callback declares
after batch form the loop body and the builder adds the return edge from
the node the callback returns.
Parameters
options
body?
(batch) => EdgeSource
Returns
merge()
merge(
options):NodeRef
internal:merge.
Parameters
options
Returns
noop()
noop(
options):NodeRef
internal:noop.
Parameters
options
Returns
note()
note(
content,options):void
A sticky note on the canvas.
Parameters
content
string
options
Returns
void
ref()
ref(
id):NodeRef
A reference to a node by id, for nodes declared later in the source.
Parameters
id
string
Returns
respondToWebhook()
respondToWebhook(
options):NodeRef
internal:respond-to-webhook.
Parameters
options
Returns
sendAndWait()
sendAndWait(
options):ApprovalRef
internal:send-and-wait.
Parameters
options
Returns
set()
set(
options):NodeRef
internal:set.
Parameters
options
Returns
sort()
sort(
options):NodeRef
internal:sort.
Parameters
options
Returns
splitOut()
splitOut(
options):NodeRef
internal:split-out.
Parameters
options
Returns
step()
step<
In,Out>(operation,options?):NodeRef<Out>
A store or internal node.
Type Parameters
In
In
Out
Out
Parameters
operation
Operation<In, Out>
options?
NodeOptions<NoInfer<In>>
Returns
NodeRef<Out>
stopAndError()
stopAndError(
options):NodeRef
internal:error (stop and error).
Parameters
options
Returns
subworkflow()
subworkflow(
options):NodeRef
internal:subworkflow.
Parameters
options
Returns
switch()
switch(
options):SwitchRef
internal:switch.
Parameters
options
Returns
transform()
transform(
options):NodeRef
internal:transform.
Parameters
options
Returns
trigger()
trigger<
In,Out>(operation,options?):NodeRef<Out>
A trigger node.
Type Parameters
In
In
Out
Out
Parameters
operation
Operation<In, Out>
options?
NodeOptions<NoInfer<In>>
Returns
NodeRef<Out>
validate()
validate(
options):ValidateRef
internal:validate.
Parameters
options
Returns
wait()
wait(
options):NodeRef
internal:wait.
Parameters
options
Returns
waitForSignal()
waitForSignal(
options):SignalWaitRef
internal:wait-for-signal (IR v2).