< Summary

Information
Class: Elsa.Workflows.CommitStates.Strategies.WorkflowExecutedWorkflowStrategy
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/CommitStates/Strategies/Workflows/WorkflowExecutedWorkflowStrategy.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 16
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ShouldCommit(...)0%620%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/CommitStates/Strategies/Workflows/WorkflowExecutedWorkflowStrategy.cs

#LineLine coverage
 1using System.ComponentModel;
 2
 3namespace Elsa.Workflows.CommitStates.Strategies;
 4
 5/// <summary>
 6/// Represents a workflow commit strategy that commits changes when the workflow has been executed.
 7/// </summary>
 8[DisplayName("Commit After Workflow Execution")]
 9[Description("Commit the workflow state when the workflow has been executed.")]
 10public class WorkflowExecutedWorkflowStrategy : IWorkflowCommitStrategy
 11{
 12    public CommitAction ShouldCommit(WorkflowCommitStateStrategyContext context)
 13    {
 014        return context.LifetimeEvent == WorkflowLifetimeEvent.WorkflowExecuted ? CommitAction.Commit : CommitAction.Defa
 15    }
 16}