Table of Contents

Class WorkflowReplayer

Namespace
Temporalio.Worker
Assembly
Temporalio.dll

Replayer to replay workflows from existing history.

public class WorkflowReplayer
Inheritance
WorkflowReplayer
Inherited Members

Constructors

WorkflowReplayer(WorkflowReplayerOptions)

Initializes a new instance of the WorkflowReplayer class. Note, some options validation is deferred until replay is attempted.

public WorkflowReplayer(WorkflowReplayerOptions options)

Parameters

options WorkflowReplayerOptions

Replayer options.

Properties

Options

Gets the options this replayer was created with.

public WorkflowReplayerOptions Options { get; }

Property Value

WorkflowReplayerOptions

Methods

ReplayWorkflowAsync(WorkflowHistory, bool)

Replay a single workflow from the given history.

public Task<WorkflowReplayResult> ReplayWorkflowAsync(WorkflowHistory history, bool throwOnReplayFailure = true)

Parameters

history WorkflowHistory

History to replay.

throwOnReplayFailure bool

If true, the default, this will throw InvalidWorkflowOperationException on a workflow task failure (e.g. non-determinism). This has no effect on workflow failures which are not reported as part of replay.

Returns

Task<WorkflowReplayResult>

Result of the replay run.

ReplayWorkflowsAsync(IAsyncEnumerable<WorkflowHistory>, bool, CancellationToken)

Replay multiple workflows from the given histories.

public IAsyncEnumerable<WorkflowReplayResult> ReplayWorkflowsAsync(IAsyncEnumerable<WorkflowHistory> histories, bool throwOnReplayFailure = false, CancellationToken cancellationToken = default)

Parameters

histories IAsyncEnumerable<WorkflowHistory>

Histories to replay.

throwOnReplayFailure bool

If true, which is not the default, this will throw InvalidWorkflowOperationException on a workflow task failure (e.g. non-determinism) as soon as it's encountered. This has no effect on workflow failures which are not reported as part of replay.

cancellationToken CancellationToken

Cancellation token to stop replaying.

Returns

IAsyncEnumerable<WorkflowReplayResult>

Results of the replay runs.

ReplayWorkflowsAsync(IEnumerable<WorkflowHistory>, bool)

Replay multiple workflows from the given histories.

public Task<IEnumerable<WorkflowReplayResult>> ReplayWorkflowsAsync(IEnumerable<WorkflowHistory> histories, bool throwOnReplayFailure = false)

Parameters

histories IEnumerable<WorkflowHistory>

Histories to replay.

throwOnReplayFailure bool

If true, which is not the default, this will throw InvalidWorkflowOperationException on a workflow task failure (e.g. non-determinism) as soon as it's encountered. This has no effect on workflow failures which are not reported as part of replay.

Returns

Task<IEnumerable<WorkflowReplayResult>>

Results of the replay runs.