Table of Contents

Class DecisionReceiptLifecycleEvent

Namespace
AsiBackbone.Core.Audit
Assembly
AsiBackbone.Core.dll

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

string

DecisionReceiptId

Gets the related decision receipt identifier when the original decision receipt is available.

public string? DecisionReceiptId { get; }

Property Value

string

EventId

Gets the stable identifier for this lifecycle event.

public string EventId { get; }

Property Value

string

HasDecisionReceiptId

Gets a value indicating whether this lifecycle event is linked to an decision receipt identifier.

public bool HasDecisionReceiptId { get; }

Property Value

bool

HasMetadata

Gets a value indicating whether this lifecycle event contains metadata.

public bool HasMetadata { get; }

Property Value

bool

Metadata

Gets additional framework-neutral lifecycle metadata supplied by the host.

public IReadOnlyDictionary<string, string> Metadata { get; }

Property Value

IReadOnlyDictionary<string, string>

OccurredUtc

Gets the UTC timestamp when the lifecycle event occurred.

public DateTimeOffset OccurredUtc { get; }

Property Value

DateTimeOffset

OperationName

Gets the operation name associated with the lifecycle event, when supplied by the host or original residue.

public string? OperationName { get; }

Property Value

string

Outcome

Gets the decision, gateway, emission, or host-defined outcome associated with this lifecycle event, when supplied.

public string? Outcome { get; }

Property Value

string

Stage

Gets the lifecycle stage represented by this event.

public DecisionReceiptLifecycleStage Stage { get; }

Property Value

DecisionReceiptLifecycleStage

StageSequence

Gets the stable sequence value for this lifecycle stage.

public int StageSequence { get; }

Property Value

int

TraceId

Gets the trace identifier associated with the lifecycle event, when supplied by the host or original residue.

public string? TraceId { get; }

Property Value

string

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

stage DecisionReceiptLifecycleStage

The lifecycle stage represented by this event.

correlationId string

The correlation identifier linking the event to the original decision context.

decisionReceiptId string

Optional decision receipt identifier when the original decision receipt is available.

eventId string

Optional lifecycle event identifier. When omitted, a new identifier is generated.

occurredUtc DateTimeOffset?

Optional lifecycle timestamp. When omitted, the current UTC timestamp is used.

traceId string

Optional trace identifier.

operationName string

Optional operation name.

outcome string

Optional lifecycle or host-defined outcome.

metadata IReadOnlyDictionary<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

stage DecisionReceiptLifecycleStage

The lifecycle stage represented by this event.

receipt IDecisionReceipt

The original decision receipt to correlate with the lifecycle event.

correlationId string

Optional correlation identifier override. When omitted, the receipt correlation identifier is used.

decisionReceiptId string

Optional decision receipt identifier override. When omitted, the receipt event identifier is used.

eventId string

Optional lifecycle event identifier. When omitted, a new identifier is generated.

occurredUtc DateTimeOffset?

Optional lifecycle timestamp. When omitted, the current UTC timestamp is used.

outcome string

Optional lifecycle or host-defined outcome. When omitted, the receipt outcome is used.

metadata IReadOnlyDictionary<string, string>

Optional host-provided lifecycle metadata merged after receipt metadata.

Returns

DecisionReceiptLifecycleEvent

An decision receipt lifecycle event.