class documentation

class TemporalOperationHandler(OperationHandler[InputT, OutputT], ABC): (source)

View In Hierarchy

Operation handler for Nexus operations that interact with Temporal. Implementations override the start_operation method.

Warning

This API is experimental and unstable.

Async Method cancel Cancel a Nexus operation using its operation token.
Async Method cancel_activity Requests cancellation of the standalone activity backing the operation.
Async Method cancel_workflow_run Cancels the workflow backing the Nexus operation.
Async Method cancel_workflow_update Cancels the Workflow Update triggered by the Nexus operation. There is no native way to cancel an accepted Update, so cancellation depends on the Update handler itself. Override this method and coordinate with the specific Update handler to trigger a cancellation.
Async Method start Start the Nexus operation using a Nexus-aware Temporal client.
Async Method start_operation Start the Temporal-backed Nexus operation.
async def cancel(self, ctx: CancelOperationContext, token: str): (source)

Cancel a Nexus operation using its operation token.

Warning

This API is experimental and unstable.

async def cancel_activity(self, ctx: TemporalCancelOperationContext, options: CancelActivityOptions): (source)

Requests cancellation of the standalone activity backing the operation.

async def cancel_workflow_run(self, ctx: TemporalCancelOperationContext, options: CancelWorkflowRunOptions): (source)

Cancels the workflow backing the Nexus operation.

Warning

This API is experimental and unstable.

async def cancel_workflow_update(self, ctx: TemporalCancelOperationContext, options: CancelUpdateWorkflowOptions): (source)

Cancels the Workflow Update triggered by the Nexus operation. There is no native way to cancel an accepted Update, so cancellation depends on the Update handler itself. Override this method and coordinate with the specific Update handler to trigger a cancellation.

Warning

This API is experimental and unstable.

async def start(self, ctx: StartOperationContext, input: InputT) -> StartOperationResultSync[OutputT] | StartOperationResultAsync: (source)

Start the Nexus operation using a Nexus-aware Temporal client.

Warning

This API is experimental and unstable.

@abstractmethod
async def start_operation(self, ctx: TemporalStartOperationContext, client: TemporalNexusClient, input: InputT) -> TemporalOperationResult[OutputT]: (source)

Start the Temporal-backed Nexus operation.