< Summary

Information
Class: Elsa.Workflows.Runtime.Entities.BookmarkQueueItem
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Entities/BookmarkQueueItem.cs
Line coverage
100%
Covered lines: 17
Uncovered lines: 0
Coverable lines: 17
Total lines: 67
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_WorkflowInstanceId()100%11100%
get_CorrelationId()100%11100%
get_BookmarkId()100%11100%
get_StimulusHash()100%11100%
get_ActivityInstanceId()100%11100%
get_ActivityTypeName()100%11100%
get_Options()100%11100%
get_CreatedAt()100%11100%
CreateBookmarkFilter()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Entities/BookmarkQueueItem.cs

#LineLine coverage
 1using Elsa.Common.Entities;
 2using Elsa.Workflows.Runtime.Filters;
 3using Elsa.Workflows.Runtime.Options;
 4
 5namespace Elsa.Workflows.Runtime.Entities;
 6
 7/// <summary>
 8/// Represents a bookmark queue item that is used to resume bookmarks that may not yet have been stored.
 9/// </summary>
 10public class BookmarkQueueItem : Entity
 11{
 12    /// <summary>
 13    /// The workflow instance ID owning the bookmark to resume.
 14    /// </summary>
 334615    public string? WorkflowInstanceId { get; set; }
 16
 17    /// <summary>
 18    /// The correlation ID associated with the workflow instance owning the bookmark to resume.
 19    /// </summary>
 116420    public string? CorrelationId { get; set; }
 21
 22    /// <summary>
 23    /// The bookmark ID to resume.
 24    /// </summary>
 122825    public string? BookmarkId { get; set; }
 26
 27    /// <summary>
 28    /// A bookmark payload hash of the bookmark to resume.
 29    /// </summary>
 232830    public string? StimulusHash { get; set; }
 31
 32    /// <summary>
 33    /// The ID of the activity instance associated with the bookmark.
 34    /// </summary>
 116435    public string? ActivityInstanceId { get; set; }
 36
 37    /// <summary>
 38    /// The type name of the activity associated with the bookmark.
 39    /// </summary>
 336440    public string? ActivityTypeName { get; set; }
 41
 42    /// <summary>
 43    /// Any options to apply when resuming the bookmark.
 44    /// </summary>
 235745    public ResumeBookmarkOptions? Options { get; set; }
 46
 47    /// <summary>
 48    /// The timestamp that this entity was created.
 49    /// </summary>
 6750    public DateTimeOffset CreatedAt { get; set; }
 51
 52    /// <summary>
 53    /// Creates a <see cref="BookmarkFilter"/> from this bookmark queue item.
 54    /// </summary>
 55    public BookmarkFilter CreateBookmarkFilter()
 56    {
 110057        return new()
 110058        {
 110059            WorkflowInstanceId = WorkflowInstanceId,
 110060            CorrelationId = CorrelationId,
 110061            BookmarkId = BookmarkId,
 110062            Hash = StimulusHash,
 110063            ActivityInstanceId = ActivityInstanceId,
 110064            Name =  ActivityTypeName
 110065        };
 66    }
 67}