class documentation

Instance of a workflow that can handle activations.

Method activate Handle an activation and return completion.
Method get_thread_id Return the thread identifier that this workflow is running on.

Handle an activation and return completion.

This should never raise an exception, but instead catch all exceptions and set as completion failure.

Parameters
act:temporalio.bridge.proto.workflow_activation.WorkflowActivationProtobuf activation.
Returns
temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletionCompletion object with successful commands set or failure info set.
def get_thread_id(self) -> Optional[int]: (source)

Return the thread identifier that this workflow is running on.

Not an abstractmethod because it is not mandatory to implement. Used primarily for getting the frames of a deadlocked thread.

Returns
Optional[int]Thread ID if the workflow is running, None if not.