class documentation
class WorkflowInstance(ABC): (source)
Known subclasses: temporalio.worker._workflow_instance._WorkflowInstanceImpl
, temporalio.worker.workflow_sandbox._runner._Instance
Instance of a workflow that can handle activations.
Method | activate |
Handle an activation and return completion. |
Method | get |
Return the thread identifier that this workflow is running on. |
@abstractmethod
def activate(self, act:
def activate(self, act:
temporalio.bridge.proto.workflow_activation.WorkflowActivation
) -> temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion
:
(source)
¶
overridden in
temporalio.worker._workflow_instance._WorkflowInstanceImpl
, temporalio.worker.workflow_sandbox._runner._Instance
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.WorkflowActivation | Protobuf activation. |
Returns | |
temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion | Completion object with successful commands set or failure info set. |
overridden in
temporalio.worker._workflow_instance._WorkflowInstanceImpl
, temporalio.worker.workflow_sandbox._runner._Instance
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[ | Thread ID if the workflow is running, None if not. |