Table of Contents

Class CompensationTriggeredEventArgs

Namespace
WorkflowForge.Events
Assembly
WorkflowForge.dll

Event arguments for compensation triggered events. Fired when compensation (rollback/saga pattern) is triggered due to a workflow failure.

public sealed class CompensationTriggeredEventArgs : BaseWorkflowForgeEventArgs
Inheritance
CompensationTriggeredEventArgs
Inherited Members

Constructors

CompensationTriggeredEventArgs(IWorkflowFoundry, DateTimeOffset, string, string, Exception?)

Initializes a new instance of the CompensationTriggeredEventArgs class.

public CompensationTriggeredEventArgs(IWorkflowFoundry foundry, DateTimeOffset triggeredAt, string reason, string failedOperationName, Exception? exception)

Parameters

foundry IWorkflowFoundry

The workflow foundry.

triggeredAt DateTimeOffset

The timestamp when compensation was triggered.

reason string

The reason compensation was triggered.

failedOperationName string

The name of the operation that failed.

exception Exception

The exception that triggered compensation.

Properties

Exception

Gets the exception that triggered compensation.

public Exception? Exception { get; }

Property Value

Exception

FailedOperationName

Gets the name of the operation that failed and triggered compensation.

public string FailedOperationName { get; }

Property Value

string

Reason

Gets the reason compensation was triggered.

public string Reason { get; }

Property Value

string

TriggeredAt

Gets the timestamp when compensation was triggered.

public DateTimeOffset TriggeredAt { get; }

Property Value

DateTimeOffset