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
foundryIWorkflowFoundryThe workflow foundry.
triggeredAtDateTimeOffsetThe timestamp when compensation was triggered.
reasonstringThe reason compensation was triggered.
failedOperationNamestringThe name of the operation that failed.
exceptionExceptionThe exception that triggered compensation.
Properties
Exception
Gets the exception that triggered compensation.
public Exception? Exception { get; }
Property Value
FailedOperationName
Gets the name of the operation that failed and triggered compensation.
public string FailedOperationName { get; }
Property Value
Reason
Gets the reason compensation was triggered.
public string Reason { get; }
Property Value
TriggeredAt
Gets the timestamp when compensation was triggered.
public DateTimeOffset TriggeredAt { get; }