< Summary

Information
Class: Elsa.Workflows.Runtime.StoreBookmarkQueue
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/StoreBookmarkQueue.cs
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 36
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
.ctor(...)100%11100%
EnqueueAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/StoreBookmarkQueue.cs

#LineLine coverage
 1using Elsa.Common;
 2using Elsa.Workflows.Runtime.Entities;
 3using Microsoft.Extensions.Logging;
 4
 5namespace Elsa.Workflows.Runtime;
 6
 4687public class StoreBookmarkQueue(
 4688    IBookmarkQueueStore store,
 4689    IBookmarkQueueSignaler bookmarkQueueSignaler,
 46810    ISystemClock systemClock,
 46811    IIdentityGenerator identityGenerator,
 46812    ILogger<StoreBookmarkQueue> logger) : IBookmarkQueue
 13{
 14    public async Task EnqueueAsync(NewBookmarkQueueItem item, CancellationToken cancellationToken = default)
 15    {
 6416        var entity = new BookmarkQueueItem
 6417        {
 6418            Id = identityGenerator.GenerateId(),
 6419            WorkflowInstanceId = item.WorkflowInstanceId,
 6420            BookmarkId = item.BookmarkId,
 6421            CorrelationId = item.CorrelationId,
 6422            StimulusHash = item.StimulusHash,
 6423            ActivityInstanceId = item.ActivityInstanceId,
 6424            ActivityTypeName = item.ActivityTypeName,
 6425            Options = item.Options,
 6426            CreatedAt = systemClock.UtcNow,
 6427        };
 28
 6429        logger.LogDebug("Enqueuing bookmark queue item {BookmarkQueueItemId} with bookmark {BookmarkId} and stimulus {St
 30
 6431        await store.AddAsync(entity, cancellationToken);
 32
 33        // Trigger the bookmark queue processor.
 6434        await bookmarkQueueSignaler.TriggerAsync(cancellationToken);
 6435    }
 36}