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
optionsWorkflowReplayerOptionsReplayer options.
Properties
Options
Gets the options this replayer was created with.
public WorkflowReplayerOptions Options { get; }
Property Value
Methods
ReplayWorkflowAsync(WorkflowHistory, bool)
Replay a single workflow from the given history.
public Task<WorkflowReplayResult> ReplayWorkflowAsync(WorkflowHistory history, bool throwOnReplayFailure = true)
Parameters
historyWorkflowHistoryHistory to replay.
throwOnReplayFailureboolIf 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
historiesIAsyncEnumerable<WorkflowHistory>Histories to replay.
throwOnReplayFailureboolIf 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.
cancellationTokenCancellationTokenCancellation 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
historiesIEnumerable<WorkflowHistory>Histories to replay.
throwOnReplayFailureboolIf 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.