Wait
Wait() -> WaitHandle
Construct a fresh Wait block with an auto-generated id.
Use this when authoring from scratch, the runtime picks a UUID automatically.
Pauses the flow for a specified duration, or until a specified event happens, whichever happens first.
WaitWait() -> WaitHandle
Construct a fresh Wait block with an auto-generated id.
Use this when authoring from scratch, the runtime picks a UUID automatically.
WaitWait(id: String) -> WaitHandle
Construct a Wait block with an operator-supplied id.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | yes | Wire identifier, typically a Connect UUID restored by decompile so round-trips stay byte-stable. |
eventsevents(value?: Array<WaitEvent>) -> WaitHandle
Set the Events parameter. The event that resumes the Wait action down its branch of the same name, as a one-element array (.events(["CustomerReturned"])). Measured 2026-10-14: Connect accepts CustomerReturned and BotParticipantDisconnected in their exact case, at most one of them, and one in place of the array; it refuses Continue, which the console's WaitEvent enum also lists. BotParticipantDisconnected requires the ParticipantNotFound error branch.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | Array<WaitEvent> | no | The event that resumes the Wait action down its branch of the same name, as a one-element array (.events(["CustomerReturned"])). Measured 2026-10-14: Connect accepts CustomerReturned and BotParticipantDisconnected in their exact case, at most one of them, and one in place of the array; it refuses Continue, which the console's WaitEvent enum also lists. BotParticipantDisconnected requires the ParticipantNotFound error branch. |
time_limit_secondstime_limit_seconds(value: String) -> WaitHandle
Set the TimeLimitSeconds parameter. Maximum number of seconds the Wait action holds the contact before falling through to NoMatchingError. Wire shape is a stringified-integer ("900", "5"). Authors pass a string (.time_limit_seconds("30")).
| Parameter | Type | Required | Description |
|---|---|---|---|
value | String | yes | Maximum number of seconds the Wait action holds the contact before falling through to NoMatchingError. Wire shape is a stringified-integer ("900", "5"). Authors pass a string (.time_limit_seconds("30")). |
continue_executioncontinue_execution(value?: ContinueExecution) -> WaitHandle
Set the ContinueExecution parameter. Routes the contact down the Continue branch while the Wait holds it. Measured 2026-10-14: Connect accepts TRUE in any casing and rejects FALSE, yes, a JSONPath and the JSON boolean true.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | ContinueExecution | no | Routes the contact down the Continue branch while the Wait holds it. Measured 2026-10-14: Connect accepts TRUE in any casing and rejects FALSE, yes, a JSONPath and the JSON boolean true. |
minimum_wait_time_secondsminimum_wait_time_seconds(value?: String) -> WaitHandle
Set the MinimumWaitTimeSeconds parameter. Minimum seconds the Wait holds the contact, as a stringified integer or a JSONPath reference.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | String | no | Minimum seconds the Wait holds the contact, as a stringified integer or a JSONPath reference. |
interruptible_eventsinterruptible_events(value?: Map<String, InterruptibleEvent (LambdaCompletion | ExternalToolCompletion)>) -> WaitHandle
Set the InterruptibleEvents parameter. Event-based wait branches, keyed by branch name; each entry holds exactly one of AsyncLambdaCompletionEvent or AsyncExternalToolCompletionEvent. Authored as .interruptible_events(#{ LambdaReturned: #{ AsyncLambdaCompletionEvent: #{ Identifier: "$.LambdaInvocation.InvocationId" } } }). Measured 2026-10-14: Connect refuses a branch name that is empty, longer than 100 characters, another Wait branch or a JSONPath reference it accepts as an Identifier.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | Map<String, InterruptibleEvent (LambdaCompletion | ExternalToolCompletion)> | no | Event-based wait branches, keyed by branch name; each entry holds exactly one of AsyncLambdaCompletionEvent or AsyncExternalToolCompletionEvent. Authored as .interruptible_events(#{ LambdaReturned: #{ AsyncLambdaCompletionEvent: #{ Identifier: "$.LambdaInvocation.InvocationId" } } }). Measured 2026-10-14: Connect refuses a branch name that is empty, longer than 100 characters, another Wait branch or a JSONPath reference it accepts as an Identifier. |
nextnext(target: Handle) -> WaitHandle
Wire the success-path transition. Substitutes the target's auto-generated UUID into the wire Transitions.NextAction slot.
| Parameter | Type | Required | Description |
|---|---|---|---|
target | Handle | yes | The block to route to once this block completes successfully. |
whenwhen(cond: ConditionHandle, target: Handle) -> WaitHandle
Append a Conditions[] branch. Multiple .when(...) calls chain, evaluation runs in source order, first match wins.
| Parameter | Type | Required | Description |
|---|---|---|---|
cond | ConditionHandle | yes | Built from the Cond::<op>(...) namespace, e.g. Cond::equals("42"). |
target | Handle | yes | Block to route to when the condition matches. |
on_no_matchingon_no_matching(target: Handle) -> WaitHandle
Wire an error transition for NoMatchingError: If no other Error matches.
| Parameter | Type | Required | Description |
|---|---|---|---|
target | Handle | yes | Block to route to on NoMatchingError. If no other Error matches. |
on_participant_not_foundon_participant_not_found(target: Handle) -> WaitHandle
Wire an error transition for ParticipantNotFound: The supported event currently is "BotParticipantDisconnected".
| Parameter | Type | Required | Description |
|---|---|---|---|
target | Handle | yes | Block to route to on ParticipantNotFound. The supported event currently is "BotParticipantDisconnected". |
set_idset_id(id: String) -> WaitHandle
Override the auto-generated identifier with a specific wire id.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | yes | Wire identifier override. Decompile threads this through to round-trip Connect-side UUIDs. |
meta_positionmeta_position(x: i64, y: i64) -> WaitHandle
Set the block's canvas position. Mostly auto-emitted by decompile; authored scripts call Flow.auto_layout() instead and let the layout pass fill positions in.
| Parameter | Type | Required | Description |
|---|---|---|---|
x | i64 | yes | Canvas X coordinate. |
y | i64 | yes | Canvas Y coordinate. |
set_metaset_meta(key: String, value: Dynamic) -> WaitHandle
Single-key escape hatch, set one ActionMetadata key by name when the typed meta_* setters don't cover it.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | String | yes | Wire key name (under Metadata.ActionMetadata[<id>]). |
value | Dynamic | yes | Any JSON-serializable Rhai value. |
overwrite_metaoverwrite_meta(value: Map) -> WaitHandle
Full-replace escape hatch, overwrite the entire ActionMetadata blob.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | Map | yes | Replacement map for the entire ActionMetadata sub-object. |
set_meta_paramset_meta_param(param: String, flag: String, value: Dynamic) -> WaitHandle
Set a single per-parameter ActionMetadata flag.
| Parameter | Type | Required | Description |
|---|---|---|---|
param | String | yes | Parameter name (e.g. "Text"). |
flag | String | yes | Flag name ("useDynamic", "MFLAG_*", etc.). |
value | Dynamic | yes | Flag value. |
overwrite_meta_paramoverwrite_meta_param(param: String, value: Map) -> WaitHandle
Replace the entire flag map for one parameter.
| Parameter | Type | Required | Description |
|---|---|---|---|
param | String | yes | Parameter name. |
value | Map | yes | Replacement flag map for the parameter. |
overwrite_parametersoverwrite_parameters(value: Map) -> WaitHandle
Wire-shape escape hatch, overwrite the entire Parameters blob.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | Map | yes | Replacement parameter map for the block. |
raw_transitionsraw_transitions(value: Map) -> WaitHandle
Wire-shape escape hatch for non-canonical transition objects.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | Map | yes | Replacement transitions map (raw JSON shape). |