using Elsa.Common.Entities;
using Elsa.Workflows.Runtime.Options;
namespace Elsa.Workflows.Runtime.Entities;
///
/// Represents a bookmark queue item that was moved out of the active queue for operator inspection.
///
public class BookmarkQueueDeadLetterItem : Entity
{
///
/// The ID of the original bookmark queue item.
///
public string OriginalQueueItemId { get; set; } = null!;
///
/// The workflow instance ID owning the bookmark to resume.
///
public string? WorkflowInstanceId { get; set; }
///
/// The correlation ID associated with the workflow instance owning the bookmark to resume.
///
public string? CorrelationId { get; set; }
///
/// The bookmark ID to resume.
///
public string? BookmarkId { get; set; }
///
/// A bookmark payload hash of the bookmark to resume.
///
public string? StimulusHash { get; set; }
///
/// The ID of the activity instance associated with the bookmark.
///
public string? ActivityInstanceId { get; set; }
///
/// The type name of the activity associated with the bookmark.
///
public string? ActivityTypeName { get; set; }
///
/// Any options to apply when resuming the bookmark.
///
public ResumeBookmarkOptions? Options { get; set; }
///
/// The timestamp that the original queue item was created.
///
public DateTimeOffset OriginalCreatedAt { get; set; }
///
/// The timestamp that this item was moved to the dead-letter store.
///
public DateTimeOffset DeadLetteredAt { get; set; }
///
/// The reason this item was moved to the dead-letter store.
///
public string Reason { get; set; } = null!;
///
/// The number of failed delivery attempts observed before dead-lettering.
///
public int DeliveryAttempts { get; set; }
///
/// The timestamp of the last failed delivery attempt.
///
public DateTimeOffset? LastAttemptedAt { get; set; }
///
/// The type of the last exception observed while processing this item.
///
public string? LastErrorType { get; set; }
///
/// The message of the last exception observed while processing this item.
///
public string? LastErrorMessage { get; set; }
///
/// Whether this item can be replayed.
///
public bool CanReplay { get; set; } = true;
///
/// The timestamp that this item was replayed.
///
public DateTimeOffset? ReplayedAt { get; set; }
///
/// The ID of the queue item created when this dead-letter item was replayed.
///
public string? ReplayedQueueItemId { get; set; }
}