< Summary

Information
Class: Elsa.Workflows.Management.Handlers.Notifications.UpdateConsumingWorkflows
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Handlers/Notifications/UpdateConsumingWorkflows.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 19
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%
HandleAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Handlers/Notifications/UpdateConsumingWorkflows.cs

#LineLine coverage
 1using Elsa.Extensions;
 2using Elsa.Mediator.Contracts;
 3using Elsa.Workflows.Management.Notifications;
 4
 5namespace Elsa.Workflows.Management.Handlers.Notifications;
 6
 7/// <summary>
 8/// Updates consuming workflows when a workflow definition is published.
 9/// </summary>
 31910public class UpdateConsumingWorkflows(IWorkflowReferenceUpdater workflowReferenceUpdater) : INotificationHandler<Workflo
 11{
 12    /// <inheritdoc />
 13    public async Task HandleAsync(WorkflowDefinitionPublished notification, CancellationToken cancellationToken)
 14    {
 515        var definition = notification.WorkflowDefinition;
 516        var result = await workflowReferenceUpdater.UpdateWorkflowReferencesAsync(definition, cancellationToken);
 517        notification.AffectedWorkflows.WorkflowDefinitions.AddRange(result.UpdatedWorkflows);
 518    }
 19}