< Summary

Information
Class: Elsa.Workflows.Activities.StateMachine.Models.Transition
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/StateMachine/Models/Transition.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 53
Line coverage: 85.7%
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
get_Name()100%11100%
get_DisplayName()100%210%
get_From()100%11100%
get_To()100%11100%
get_Trigger()100%11100%
get_Condition()100%11100%
get_Action()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/StateMachine/Models/Transition.cs

#LineLine coverage
 1using System.ComponentModel;
 2using Elsa.Workflows.Attributes;
 3using Elsa.Workflows.Models;
 4using Elsa.Workflows.UIHints;
 5
 6namespace Elsa.Workflows.Activities.StateMachine.Models;
 7
 8/// <summary>
 9/// Represents a directed transition between two states.
 10/// </summary>
 11public class Transition
 12{
 13    /// <summary>
 14    /// The transition name.
 15    /// </summary>
 14316    public string? Name { get; set; }
 17
 18    /// <summary>
 19    /// A human-readable transition name.
 20    /// </summary>
 021    public string? DisplayName { get; set; }
 22
 23    /// <summary>
 24    /// The source state name.
 25    /// </summary>
 20126    public string From { get; set; } = "";
 27
 28    /// <summary>
 29    /// The target state name.
 30    /// </summary>
 12131    public string To { get; set; } = "";
 32
 33    /// <summary>
 34    /// The trigger activity that starts this transition.
 35    /// </summary>
 36    [Port]
 37    [Browsable(false)]
 13038    public IActivity? Trigger { get; set; }
 39
 40    /// <summary>
 41    /// The condition that determines whether the transition can be taken.
 42    /// When this evaluates to <c>false</c>, the trigger is re-armed until another trigger wins or the condition later e
 43    /// </summary>
 44    [Input(UIHint = InputUIHints.SingleLine)]
 4345    public Input<bool>? Condition { get; set; }
 46
 47    /// <summary>
 48    /// The activity to execute after the transition is accepted.
 49    /// </summary>
 50    [Port]
 51    [Browsable(false)]
 6052    public IActivity? Action { get; set; }
 53}