Interface: UpdatableWorkflowHandle<T>
nexus.UpdatableWorkflowHandle
A WorkflowHandle that can additionally back the current Nexus Operation with a Workflow Update. Returned by TemporalNexusClient.getWorkflowHandle.
update lives on this interface rather than on WorkflowHandle so that the handles returned
by startWorkflow and signalWithStartWorkflow do not advertise it: the Workflow run
they refer to already backs the operation, and a Nexus Operation handler invocation may only start
one async backing operation.
Nexus support in Temporal SDK is experimental.
Type parameters
| Name |
|---|
T |
Hierarchy
-
↳
UpdatableWorkflowHandle
Properties
runId
• Optional Readonly runId: string
Inherited from
workflowId
• Readonly workflowId: string
Inherited from
Methods
signal
▸ signal<Args, Name>(def, ...args): Promise<void>
Type parameters
| Name | Type |
|---|---|
Args | extends any[] = [] |
Name | extends string = string |
Parameters
| Name | Type |
|---|---|
def | string | SignalDefinition<Args, Name> |
...args | Args |
Returns
Promise<void>
Inherited from
update
▸ update<Ret, Args, Name>(def, options): Promise<TemporalOperationResult<Ret>>
Sends an Update to this Workflow as the backing operation for the current Nexus Operation.
The Update request is augmented with the Nexus Operation's request ID (for deduplication), its request links, and a completion callback carrying the operation token, so the Update's completion is delivered back to the Nexus caller.
Only asynchronous, ACCEPTED-stage Updates are supported: this method returns once the Update
is accepted, yielding an asynchronous TemporalOperationResult whose completion is
delivered via the callback. If the Update has already completed by the time it is accepted (for
example a retried request with the same Update ID, or an Update that completes immediately), a
synchronous result is returned instead; if that completed Update failed (e.g. validation
rejection, which is non-retryable), it surfaces as a failed Nexus Operation.
If the Update takes arguments, options.args is required; an Update that takes no arguments
accepts no args and may be called without options at all.
Nexus support in Temporal SDK is experimental.
Type parameters
| Name | Type |
|---|---|
Ret | Ret |
Args | extends [any, ...any[]] |
Name | extends string = string |
Parameters
| Name | Type |
|---|---|
def | string | UpdateDefinition<Ret, Args, Name> |
options | NexusUpdateWorkflowOptions & { args: Args } |
Returns
Promise<TemporalOperationResult<Ret>>
▸ update<Ret, Args, Name>(def, options?): Promise<TemporalOperationResult<Ret>>
Type parameters
| Name | Type |
|---|---|
Ret | Ret |
Args | extends [] = [] |
Name | extends string = string |
Parameters
| Name | Type |
|---|---|
def | string | UpdateDefinition<Ret, Args, Name> |
options? | NexusUpdateWorkflowOptions & { args?: Args } |
Returns
Promise<TemporalOperationResult<Ret>>