< Summary

Information
Class: Elsa.Extensions.PipelineWorkflowsFeatureExtensions
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Extensions/PipelineWorkflowsFeatureExtensions.cs
Line coverage
68%
Covered lines: 11
Uncovered lines: 5
Coverable lines: 16
Total lines: 42
Line coverage: 68.7%
Branch coverage
25%
Covered branches: 1
Total branches: 4
Branch coverage: 25%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
WithDefaultWorkflowExecutionPipeline(...)0%620%
WithDefaultActivityExecutionPipeline(...)50%22100%

File(s)

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

#LineLine coverage
 1using Elsa.Workflows;
 2using Elsa.Workflows.Features;
 3using Elsa.Workflows.Middleware.Activities;
 4
 5// ReSharper disable once CheckNamespace
 6namespace Elsa.Extensions;
 7
 8/// <summary>
 9/// Adds an extension method to the <see cref="WorkflowsFeature"/> that installs a default workflow runtime execution pi
 10/// </summary>
 11public static class PipelineWorkflowsFeatureExtensions
 12{
 13    /// <summary>
 14    /// Installs a default workflow runtime execution pipeline.
 15    /// </summary>
 16    public static WorkflowsFeature WithDefaultWorkflowExecutionPipeline(this WorkflowsFeature workflowsFeature, Action<I
 17    {
 018        return workflowsFeature.WithWorkflowExecutionPipeline(pipeline =>
 019        {
 020            pipeline.UseDefaultPipeline();
 021            configurePipeline?.Invoke(pipeline);
 022        });
 23    }
 24
 25    /// <summary>
 26    /// Installs an activity invoker that can run activities asynchronously in the background.
 27    /// </summary>
 28    public static WorkflowsFeature WithDefaultActivityExecutionPipeline(this WorkflowsFeature workflowsFeature, Action<I
 29    {
 17230        return workflowsFeature.WithActivityExecutionPipeline(pipeline =>
 17231        {
 43632            pipeline
 43633                .UseExceptionHandling()
 43634                .UseExecutionLogging()
 43635                .UseNotifications()
 43636                .UseLogPersistenceModeEvaluation()
 43637                .UseBackgroundActivityInvoker();
 17238
 43639            configurePipeline?.Invoke(pipeline);
 17240        });
 41    }
 42}