Table of Contents

Class WorkflowReplayerOptions

Namespace
Temporalio.Worker
Assembly
Temporalio.dll

Options for a WorkflowReplayer. At least one workflow is required.

public class WorkflowReplayerOptions : ICloneable
Inheritance
WorkflowReplayerOptions
Implements
Inherited Members

Properties

BuildId

Gets or sets the build ID. This is a unique identifier for each "build" of the worker. If unset, the default is Assembly.GetEntryAssembly().ManifestModule.ModuleVersionId.

public string? BuildId { get; set; }

Property Value

string

DataConverter

Gets or sets the data converter. Default is Default.

public DataConverter DataConverter { get; set; }

Property Value

DataConverter

DebugMode

Gets or sets a value indicating whether deadlock detection will be disabled for all workflows. If unset, this value defaults to true only if the TEMPORAL_DEBUG environment variable is true or 1.

public bool DebugMode { get; set; }

Property Value

bool

Remarks

When false, the default, deadlock detection prevents workflow tasks from taking too long before yielding back to Temporal. This is undesirable when stepping through code, so this should be set to true in those cases.

DisableWorkflowTracingEventListener

Gets or sets a value indicating whether workflow tracing event listener will be disabled for all workflows.

public bool DisableWorkflowTracingEventListener { get; set; }

Property Value

bool

Remarks

When false, the default, a EventListener is used to catch improper calls from inside the workflow.

Identity

Gets or sets the identity for this worker.

public string? Identity { get; set; }

Property Value

string

Interceptors

Gets or sets the interceptors.

public IReadOnlyCollection<IWorkerInterceptor>? Interceptors { get; set; }

Property Value

IReadOnlyCollection<IWorkerInterceptor>

LoggerFactory

Gets or sets the logging factory used by loggers in workers. If unset, defaults to the client logger factory.

public ILoggerFactory LoggerFactory { get; set; }

Property Value

ILoggerFactory

Namespace

Gets or sets the namespace. Default is "ReplayNamespace".

public string Namespace { get; set; }

Property Value

string

Runtime

Gets or sets runtime for this replayer.

public TemporalRuntime? Runtime { get; set; }

Property Value

TemporalRuntime

Remarks

By default this uses Default which is lazily created when first needed.

TaskQueue

Gets or sets the task queue. Default is "ReplayTaskQueue". This is often only used for logging so this does not need to be set for most uses of a replayer.

public string TaskQueue { get; set; }

Property Value

string

WorkflowFailureExceptionTypes

Gets or sets workflow failure exception types. See WorkflowFailureExceptionTypes.

public IReadOnlyCollection<Type>? WorkflowFailureExceptionTypes { get; set; }

Property Value

IReadOnlyCollection<Type>

Workflows

Gets the workflow definitions.

public IList<WorkflowDefinition> Workflows { get; }

Property Value

IList<WorkflowDefinition>

Methods

AddWorkflow(Type)

Add the given type as a workflow.

public WorkflowReplayerOptions AddWorkflow(Type type)

Parameters

type Type

Type to add.

Returns

WorkflowReplayerOptions

This options instance for chaining.

AddWorkflow(WorkflowDefinition)

Add the given workflow definition. Most users will use AddWorkflow<T>() instead.

public WorkflowReplayerOptions AddWorkflow(WorkflowDefinition definition)

Parameters

definition WorkflowDefinition

Definition to add.

Returns

WorkflowReplayerOptions

This options instance for chaining.

AddWorkflow<T>()

Add the given type as a workflow.

public WorkflowReplayerOptions AddWorkflow<T>()

Returns

WorkflowReplayerOptions

This options instance for chaining.

Type Parameters

T

Type to add.

Clone()

Create a shallow copy of these options.

public virtual object Clone()

Returns

object

A shallow copy of these options and any transitive options fields. Also copies collections of workflows.

Events

WorkflowTaskCompleted

Event for when a workflow task has completed but not yet sent back to the server. This should only be used for very advanced scenarios.

public event EventHandler<WorkflowTaskCompletedEventArgs>? WorkflowTaskCompleted

Event Type

EventHandler<WorkflowTaskCompletedEventArgs>

Remarks

WARNING: This is experimental and there are many caveats about its use. It is important to read the documentation on WorkflowTaskStarting.

WorkflowTaskStarting

Event for when a workflow task is starting. This should only be used for very advanced scenarios.

public event EventHandler<WorkflowTaskStartingEventArgs>? WorkflowTaskStarting

Event Type

EventHandler<WorkflowTaskStartingEventArgs>

Remarks

WARNING: This is experimental and there are many caveats about its use. It is important to read the documentation on WorkflowTaskStarting.