< Summary

Information
Class: Elsa.Workflows.Runtime.Extensions.ActivityExecutionRecordExtensions
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Extensions/ActivityExecutionRecordExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 32
Line coverage: 0%
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
GetExecutionChainAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Extensions/ActivityExecutionRecordExtensions.cs

#LineLine coverage
 1using Elsa.Common.Models;
 2using Elsa.Workflows.Runtime.Entities;
 3
 4namespace Elsa.Workflows.Runtime.Extensions;
 5
 6/// <summary>
 7/// Provides extension methods for <see cref="ActivityExecutionRecord"/>.
 8/// </summary>
 9public static class ActivityExecutionRecordExtensions
 10{
 11    /// <summary>
 12    /// Retrieves the execution chain for the specified activity execution record by using the store.
 13    /// Returns records ordered from root (depth 0) to the specified record.
 14    /// </summary>
 15    /// <param name="record">The activity execution record to retrieve the chain for.</param>
 16    /// <param name="store">The activity execution store to use for retrieving the chain.</param>
 17    /// <param name="includeCrossWorkflowChain">If true (default), follows SchedulingWorkflowInstanceId across workflow 
 18    /// <param name="skip">The number of items to skip (for pagination).</param>
 19    /// <param name="take">The maximum number of items to return (for pagination).</param>
 20    /// <param name="cancellationToken">An optional cancellation token.</param>
 21    /// <returns>A paginated result containing the call stack records, ordered from root to leaf.</returns>
 22    public static Task<Page<ActivityExecutionRecord>> GetExecutionChainAsync(
 23        this ActivityExecutionRecord record,
 24        IActivityExecutionStore store,
 25        bool includeCrossWorkflowChain = true,
 26        int? skip = null,
 27        int? take = null,
 28        CancellationToken cancellationToken = default)
 29    {
 030        return store.GetExecutionChainAsync(record.Id, includeCrossWorkflowChain, skip, take, cancellationToken);
 31    }
 32}