Skip to main content

Interface: TemporalStartOperationContext

Experimental

Context received by a TemporalOperationHandler's start handler when a Nexus Operation is started.

Temporal Operation handlers are experimental.

Extends​

  • StartOperationContext

Properties​

abortSignal​

readonly abortSignal: AbortSignal

Experimental

An AbortSignal that is signaled when the current request is canceled, e.g. because the request timed out or the client disconnected.

The framework will cancel the abort controller with an unspecified error type. The handler must rethrow the error object to confirm cancelation. The handler may ignore cancelation and return a result anyway, but there is no guarantee that the client will still be waiting for the result of that request.

Note that cancelation of the current request is not the same thing - and does not relate with - cancelation of the operation itself, which is notified by calling the OperationHandler.cancel method.

Inherited from​

nexus.StartOperationContext.abortSignal


callbackHeaders?​

readonly optional callbackHeaders?: Record<string, string>

Experimental

Optional header fields set by a client that are required to be attached to the callback request when an asynchronous operation completes.

Inherited from​

nexus.StartOperationContext.callbackHeaders


callbackUrl?​

readonly optional callbackUrl?: string

Experimental

Callbacks are used to deliver completion of async operations.

A callback URL may optionally be provided by the client and should be called by this handler upon completion if the started operation is async.

Inherited from​

nexus.StartOperationContext.callbackUrl


headers​

readonly headers: Record<string, string>

Experimental

Request header fields.

Inherited from​

nexus.StartOperationContext.headers


readonly inboundLinks: Link[]

Experimental

Links received in the request.

This list is automatically populated when handling a start request. Handlers may use these links, for example to add information about the caller to a resource associated with the operation execution.

Inherited from​

nexus.StartOperationContext.inboundLinks


operation​

readonly operation: string

Experimental

Name of the operation.

Inherited from​

nexus.StartOperationContext.operation


readonly outboundLinks: Link[]

Experimental

Links to be returned by the handler.

This list is initially empty. Handlers may add to this list, for example links describing resources associated with the operation execution that may be of use to the caller.

Inherited from​

nexus.StartOperationContext.outboundLinks


requestDeadline?​

readonly optional requestDeadline?: Date

Experimental

Get the deadline for the operation handler method.

Note that this is the time by which the current request should complete, not the operation's deadline.

Inherited from​

nexus.StartOperationContext.requestDeadline


requestId​

readonly requestId: string

Experimental

Request ID that may be used by the server handler to dedupe a start request. By default a v4 UUID will be generated by the client.

Inherited from​

nexus.StartOperationContext.requestId


service​

readonly service: string

Experimental

Name of the service that contains the operation.

Inherited from​

nexus.StartOperationContext.service