class documentation

class WorkflowInstance(ABC): (source)

View In Hierarchy

Instance of a workflow that can handle activations.

Method activate Handle an activation and return completion.
@abstractmethod
def activate(self, act: temporalio.bridge.proto.workflow_activation.WorkflowActivation) -> temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion: (source)

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.