Skip to main content

Interface: WorkflowClientInterceptor

Implement any of these methods to intercept WorkflowClient outbound calls

Properties​

cancel?​

optional cancel?: (input, next) => Promise<IRequestCancelWorkflowExecutionResponse>

Intercept a service call to requestCancelWorkflowExecution

Parameters​

input​

WorkflowCancelInput

next​

OmitLastParam<(input: WorkflowCancelInput, next: OmitLastParam<...>) => Promise<IRequestCancelWorkflowExecutionResponse>>

Returns​

Promise<IRequestCancelWorkflowExecutionResponse>


describe?​

optional describe?: (input, next) => Promise<IDescribeWorkflowExecutionResponse>

Intercept a service call to describeWorkflowExecution

Parameters​

input​

WorkflowDescribeInput

next​

OmitLastParam<(input: WorkflowDescribeInput, next: OmitLastParam<...>) => Promise<IDescribeWorkflowExecutionResponse>>

Returns​

Promise<IDescribeWorkflowExecutionResponse>


fetchHistory?​

optional fetchHistory?: (input, next) => Promise<IHistory>

Experimental

Intercept a service call to getWorkflowExecutionHistory

This interceptor method is experimental - API changes are still possible.

Parameters​

input​

WorkflowFetchHistoryInput

next​

OmitLastParam<(input: WorkflowFetchHistoryInput, next: OmitLastParam<...>) => Promise<IHistory>>

Returns​

Promise<IHistory>


list?​

optional list?: (input, next) => AsyncIterable<WorkflowExecutionInfo>

Experimental

Intercept a service call to listWorkflowExecutions

One interception spans a single consumption of the returned async iterable, including pagination across multiple RPCs and early consumer termination.

This interceptor method is experimental - API changes are still possible.

Parameters​

input​

WorkflowListInput

next​

OmitLastParam<(input: WorkflowListInput, next: OmitLastParam<...>) => AsyncIterable<WorkflowExecutionInfo>>

Returns​

AsyncIterable<WorkflowExecutionInfo>


query?​

optional query?: (input, next) => Promise<unknown>

Intercept a service call to queryWorkflow

Parameters​

input​

WorkflowQueryInput

next​

OmitLastParam<(input: WorkflowQueryInput, next: OmitLastParam<...>) => Promise<unknown>>

Returns​

Promise<unknown>


signal?​

optional signal?: (input, next) => Promise<void>

Intercept a service call to signalWorkflowExecution

If you implement this method, signalWithStart most likely needs to be implemented too

Parameters​

input​

WorkflowSignalInput

next​

OmitLastParam<(input: WorkflowSignalInput, next: OmitLastParam<...>) => Promise<void>>

Returns​

Promise<void>


signalWithStart?​

optional signalWithStart?: (input, next) => Promise<string>

Intercept a service call to signalWithStartWorkflowExecution

Parameters​

input​

WorkflowSignalWithStartInput

next​

OmitLastParam<(input: WorkflowSignalWithStartInput, next: OmitLastParam<...>) => Promise<string>>

Returns​

Promise<string>


start?​

optional start?: (input, next) => Promise<string>

Intercept a service call to startWorkflowExecution

If you implement this method, signalWithStart most likely needs to be implemented too

Parameters​

input​

WorkflowStartInput

next​

OmitLastParam<(input: WorkflowStartInput, next: OmitLastParam<...>) => Promise<string>>

Returns​

Promise<string>

Deprecated​

in favour of startWithDetails


startUpdate?​

optional startUpdate?: (input, next) => Promise<WorkflowStartUpdateOutput>

Intercept a service call to updateWorkflowExecution

Parameters​

input​

WorkflowStartUpdateInput

next​

OmitLastParam<(input: WorkflowStartUpdateInput, next: OmitLastParam<...>) => Promise<WorkflowStartUpdateOutput>>

Returns​

Promise<WorkflowStartUpdateOutput>


startUpdateWithStart?​

optional startUpdateWithStart?: (input, next) => Promise<WorkflowStartUpdateWithStartOutput>

Intercept a service call to startUpdateWithStart

Parameters​

input​

WorkflowStartUpdateWithStartInput

next​

OmitLastParam<(input: WorkflowStartUpdateWithStartInput, next: OmitLastParam<...>) => Promise<WorkflowStartUpdateWithStartOutput>>

Returns​

Promise<WorkflowStartUpdateWithStartOutput>


startWithDetails?​

optional startWithDetails?: (input, next) => Promise<WorkflowStartOutput>

Intercept a service call to startWorkflowExecution

This method returns start details via WorkflowStartOutput.

If you implement this method, signalWithStart most likely needs to be implemented too

Parameters​

input​

WorkflowStartInput

next​

OmitLastParam<(input: WorkflowStartInput, next: OmitLastParam<...>) => Promise<WorkflowStartOutput>>

Returns​

Promise<WorkflowStartOutput>


terminate?​

optional terminate?: (input, next) => Promise<ITerminateWorkflowExecutionResponse>

Intercept a service call to terminateWorkflowExecution

Parameters​

input​

WorkflowTerminateInput

next​

OmitLastParam<(input: WorkflowTerminateInput, next: OmitLastParam<...>) => Promise<ITerminateWorkflowExecutionResponse>>

Returns​

Promise<ITerminateWorkflowExecutionResponse>