< Summary

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

File(s)

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

#LineLine coverage
 1using Elsa.Workflows.Management;
 2
 3namespace Elsa.Workflows.Runtime;
 4
 5/// <inheritdoc />
 1386public class DefaultRegistriesPopulator(IWorkflowDefinitionStorePopulator workflowDefinitionStorePopulator, IActivityReg
 7{
 8    /// <inheritdoc />
 9    public async Task PopulateAsync(CancellationToken cancellationToken = default)
 10    {
 11        // Stage 1: Populate the activity registry.
 12        // Because workflow definitions can be used as activities, we need to make sure that the activity registry is po
 13913        await activityRegistryPopulator.PopulateRegistryAsync(cancellationToken);
 14
 15        // Stage 2: Populate the workflow definition store.
 13916        await workflowDefinitionStorePopulator.PopulateStoreAsync(false, cancellationToken);
 17
 18        // Stage 3: Re-populate the activity registry.
 19        // After the workflow definition store has been populated, we need to re-populate the activity registry to make 
 13920        await activityRegistryPopulator.PopulateRegistryAsync(cancellationToken);
 21
 22        // Stage 4. Re-update the workflow definition store with the current set of activities.
 23        // Finally, we need to re-populate the workflow definition store to make sure that the workflow definitions are 
 13924        await workflowDefinitionStorePopulator.PopulateStoreAsync(true, cancellationToken);
 13925    }
 26}