class documentation

Abstract runner for workflows that creates workflow instances to run.

UnsandboxedWorkflowRunner is an implementation that locally runs the workflow.

Method create_instance Create a workflow instance that can handle activations.
Method prepare_workflow Prepare a workflow for future execution.
@abstractmethod
def create_instance(self, det: WorkflowInstanceDetails) -> WorkflowInstance: (source)

Create a workflow instance that can handle activations.

Parameters
det:WorkflowInstanceDetailsDetails that can be used to create the instance.
Returns
WorkflowInstanceWorkflow instance that can handle activations.
@abstractmethod
def prepare_workflow(self, defn: temporalio.workflow._Definition): (source)

Prepare a workflow for future execution.

This is run once for each workflow definition when a worker starts. This allows the runner to do anything necessarily to prepare for this definition to be used multiple times in create_instance.

Parameters
defn:temporalio.workflow._DefinitionThe workflow definition.