Class DecisionReceiptLifecycleEvent
Represents a framework-neutral lifecycle event linked to a governed decision receipt flow.
public sealed class DecisionReceiptLifecycleEvent
- Inheritance
-
DecisionReceiptLifecycleEvent
- Inherited Members
Remarks
Lifecycle events are append-only progress records. They allow acknowledgment, capability grant, gateway, outbox, and provider delivery activity to be recorded without rewriting the original decision receipt.
Properties
CorrelationId
Gets the correlation identifier that links this lifecycle event to the original decision context.
public string CorrelationId { get; }
Property Value
DecisionReceiptId
Gets the related decision receipt identifier when the original decision receipt is available.
public string? DecisionReceiptId { get; }
Property Value
EventId
Gets the stable identifier for this lifecycle event.
public string EventId { get; }
Property Value
HasDecisionReceiptId
Gets a value indicating whether this lifecycle event is linked to an decision receipt identifier.
public bool HasDecisionReceiptId { get; }
Property Value
HasMetadata
Gets a value indicating whether this lifecycle event contains metadata.
public bool HasMetadata { get; }
Property Value
Metadata
Gets additional framework-neutral lifecycle metadata supplied by the host.
public IReadOnlyDictionary<string, string> Metadata { get; }
Property Value
OccurredUtc
Gets the UTC timestamp when the lifecycle event occurred.
public DateTimeOffset OccurredUtc { get; }
Property Value
OperationName
Gets the operation name associated with the lifecycle event, when supplied by the host or original residue.
public string? OperationName { get; }
Property Value
Outcome
Gets the decision, gateway, emission, or host-defined outcome associated with this lifecycle event, when supplied.
public string? Outcome { get; }
Property Value
Stage
Gets the lifecycle stage represented by this event.
public DecisionReceiptLifecycleStage Stage { get; }
Property Value
StageSequence
Gets the stable sequence value for this lifecycle stage.
public int StageSequence { get; }
Property Value
TraceId
Gets the trace identifier associated with the lifecycle event, when supplied by the host or original residue.
public string? TraceId { get; }
Property Value
Methods
Create(DecisionReceiptLifecycleStage, string, string?, string?, DateTimeOffset?, string?, string?, string?, IReadOnlyDictionary<string, string>?)
Creates an decision receipt lifecycle event.
public static DecisionReceiptLifecycleEvent Create(DecisionReceiptLifecycleStage stage, string correlationId, string? decisionReceiptId = null, string? eventId = null, DateTimeOffset? occurredUtc = null, string? traceId = null, string? operationName = null, string? outcome = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
stageDecisionReceiptLifecycleStageThe lifecycle stage represented by this event.
correlationIdstringThe correlation identifier linking the event to the original decision context.
decisionReceiptIdstringOptional decision receipt identifier when the original decision receipt is available.
eventIdstringOptional lifecycle event identifier. When omitted, a new identifier is generated.
occurredUtcDateTimeOffset?Optional lifecycle timestamp. When omitted, the current UTC timestamp is used.
traceIdstringOptional trace identifier.
operationNamestringOptional operation name.
outcomestringOptional lifecycle or host-defined outcome.
metadataIReadOnlyDictionary<string, string>Optional host-provided lifecycle metadata.
Returns
- DecisionReceiptLifecycleEvent
An decision receipt lifecycle event.
FromDecisionReceipt(DecisionReceiptLifecycleStage, IDecisionReceipt, string?, string?, string?, DateTimeOffset?, string?, IReadOnlyDictionary<string, string>?)
Creates an decision receipt lifecycle event by copying correlation context from existing decision receipt.
public static DecisionReceiptLifecycleEvent FromDecisionReceipt(DecisionReceiptLifecycleStage stage, IDecisionReceipt receipt, string? correlationId = null, string? decisionReceiptId = null, string? eventId = null, DateTimeOffset? occurredUtc = null, string? outcome = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
stageDecisionReceiptLifecycleStageThe lifecycle stage represented by this event.
receiptIDecisionReceiptThe original decision receipt to correlate with the lifecycle event.
correlationIdstringOptional correlation identifier override. When omitted, the receipt correlation identifier is used.
decisionReceiptIdstringOptional decision receipt identifier override. When omitted, the receipt event identifier is used.
eventIdstringOptional lifecycle event identifier. When omitted, a new identifier is generated.
occurredUtcDateTimeOffset?Optional lifecycle timestamp. When omitted, the current UTC timestamp is used.
outcomestringOptional lifecycle or host-defined outcome. When omitted, the receipt outcome is used.
metadataIReadOnlyDictionary<string, string>Optional host-provided lifecycle metadata merged after receipt metadata.
Returns
- DecisionReceiptLifecycleEvent
An decision receipt lifecycle event.