< Summary

Information
Class: Elsa.Workflows.Api.Endpoints.BookmarkQueueDeadLetters.BookmarkQueueDeadLetterModel
Assembly: Elsa.Workflows.Api
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Endpoints/BookmarkQueueDeadLetters/Models.cs
Line coverage
100%
Covered lines: 41
Uncovered lines: 0
Coverable lines: 41
Total lines: 69
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_TenantId()100%11100%
get_OriginalQueueItemId()100%11100%
get_WorkflowInstanceId()100%11100%
get_CorrelationId()100%11100%
get_BookmarkId()100%11100%
get_StimulusHash()100%11100%
get_ActivityInstanceId()100%11100%
get_ActivityTypeName()100%11100%
get_OriginalCreatedAt()100%11100%
get_DeadLetteredAt()100%11100%
get_Reason()100%11100%
get_DeliveryAttempts()100%11100%
get_LastAttemptedAt()100%11100%
get_LastErrorType()100%11100%
get_LastErrorMessage()100%11100%
get_CanReplay()100%11100%
get_ReplayedAt()100%11100%
get_ReplayedQueueItemId()100%11100%
FromEntity(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Endpoints/BookmarkQueueDeadLetters/Models.cs

#LineLine coverage
 1using Elsa.Workflows.Runtime.Entities;
 2
 3namespace Elsa.Workflows.Api.Endpoints.BookmarkQueueDeadLetters;
 4
 5public class ListRequest
 6{
 7    public int? Page { get; set; }
 8    public int? PageSize { get; set; }
 9    public string? WorkflowInstanceId { get; set; }
 10}
 11
 12public class ListResponse(ICollection<BookmarkQueueDeadLetterModel> items, long totalCount)
 13{
 14    public ICollection<BookmarkQueueDeadLetterModel> Items { get; set; } = items;
 15    public long TotalCount { get; set; } = totalCount;
 16}
 17
 18public class BookmarkQueueDeadLetterModel
 19{
 320    public string Id { get; set; } = null!;
 321    public string? TenantId { get; set; }
 322    public string OriginalQueueItemId { get; set; } = null!;
 323    public string? WorkflowInstanceId { get; set; }
 324    public string? CorrelationId { get; set; }
 325    public string? BookmarkId { get; set; }
 326    public string? StimulusHash { get; set; }
 327    public string? ActivityInstanceId { get; set; }
 328    public string? ActivityTypeName { get; set; }
 329    public DateTimeOffset OriginalCreatedAt { get; set; }
 330    public DateTimeOffset DeadLetteredAt { get; set; }
 331    public string Reason { get; set; } = null!;
 332    public int DeliveryAttempts { get; set; }
 333    public DateTimeOffset? LastAttemptedAt { get; set; }
 334    public string? LastErrorType { get; set; }
 335    public string? LastErrorMessage { get; set; }
 336    public bool CanReplay { get; set; }
 337    public DateTimeOffset? ReplayedAt { get; set; }
 338    public string? ReplayedQueueItemId { get; set; }
 39
 140    public static BookmarkQueueDeadLetterModel FromEntity(BookmarkQueueDeadLetterItem item) => new()
 141    {
 142        Id = item.Id,
 143        TenantId = item.TenantId,
 144        OriginalQueueItemId = item.OriginalQueueItemId,
 145        WorkflowInstanceId = item.WorkflowInstanceId,
 146        CorrelationId = item.CorrelationId,
 147        BookmarkId = item.BookmarkId,
 148        StimulusHash = item.StimulusHash,
 149        ActivityInstanceId = item.ActivityInstanceId,
 150        ActivityTypeName = item.ActivityTypeName,
 151        OriginalCreatedAt = item.OriginalCreatedAt,
 152        DeadLetteredAt = item.DeadLetteredAt,
 153        Reason = item.Reason,
 154        DeliveryAttempts = item.DeliveryAttempts,
 155        LastAttemptedAt = item.LastAttemptedAt,
 156        LastErrorType = item.LastErrorType,
 157        LastErrorMessage = item.LastErrorMessage,
 158        CanReplay = item.CanReplay,
 159        ReplayedAt = item.ReplayedAt,
 160        ReplayedQueueItemId = item.ReplayedQueueItemId
 161    };
 62}
 63
 64public class ReplayResponse(bool replayed, string? queueItemId, string? reason)
 65{
 66    public bool Replayed { get; set; } = replayed;
 67    public string? QueueItemId { get; set; } = queueItemId;
 68    public string? Reason { get; set; } = reason;
 69}