< Summary

Information
Class: Elsa.Workflows.Management.Entities.WorkflowInstance
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Entities/WorkflowInstance.cs
Line coverage
100%
Covered lines: 15
Uncovered lines: 0
Coverable lines: 15
Total lines: 91
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
get_DefinitionId()100%11100%
get_DefinitionVersionId()100%11100%
get_Version()100%11100%
get_ParentWorkflowInstanceId()100%11100%
get_WorkflowState()100%11100%
get_Status()100%11100%
get_SubStatus()100%11100%
get_IsExecuting()100%11100%
get_CorrelationId()100%11100%
get_Name()100%11100%
get_IncidentCount()100%11100%
get_IsSystem()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%
get_FinishedAt()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Entities/WorkflowInstance.cs

#LineLine coverage
 1using Elsa.Common.Entities;
 2using Elsa.Workflows.State;
 3
 4namespace Elsa.Workflows.Management.Entities;
 5
 6/// <summary>
 7/// Represents a workflow instance.
 8/// </summary>
 9public class WorkflowInstance : Entity
 10{
 11    /// <summary>
 12    /// The ID of the workflow definition.
 13    /// </summary>
 40114    public string DefinitionId { get; set; } = null!;
 15
 16    /// <summary>
 17    /// The version ID of the workflow definition.
 18    /// </summary>
 51119    public string DefinitionVersionId { get; set; } = null!;
 20
 21    /// <summary>
 22    /// The version of the workflow definition.
 23    /// </summary>
 39924    public int Version { get; set; }
 25
 26    /// <summary>
 27    /// The ID of the parent workflow.
 28    /// </summary>
 39929    public string? ParentWorkflowInstanceId { get; set; }
 30
 31    /// <summary>
 32    /// The state of the workflow instance.
 33    /// </summary>
 107334    public WorkflowState WorkflowState { get; set; } = null!;
 35
 36    /// <summary>
 37    /// The status of the workflow instance.
 38    /// </summary>
 51539    public WorkflowStatus Status { get; set; }
 40
 41    /// <summary>
 42    /// The sub-status of the workflow instance.
 43    /// </summary>
 40244    public WorkflowSubStatus SubStatus { get; set; }
 45
 46    /// <summary>
 47    /// Gets or sets a value indicating whether the workflow instance is actively executing.
 48    /// </summary>
 49    /// <remarks>
 50    /// This flag is set to <c>true</c> immediately before the workflow begins execution
 51    /// and is set to <c>false</c> once the execution is completed.
 52    /// It can be used to determine if a workflow instance was in-progress in case of unexpected
 53    /// application termination, allowing the system to retry execution upon restarting.
 54    /// </remarks>
 32755    public bool IsExecuting { get; set; }
 56
 57    /// <summary>
 58    /// The ID of the workflow instance.
 59    /// </summary>
 40160    public string? CorrelationId { get; set; }
 61
 62    /// <summary>
 63    /// The name of the workflow instance.
 64    /// </summary>
 39965    public string? Name { get; set; }
 66
 67    /// <summary>
 68    /// The number of incidents that have occurred during execution, if any.
 69    /// </summary>
 39970    public int IncidentCount { get; set; }
 71
 72    /// <summary>
 73    /// Gets or sets a value indicating whether the workflow instance is a system workflow.
 74    /// </summary>
 39975    public bool IsSystem { get; set; }
 76
 77    /// <summary>
 78    /// The timestamp when the workflow instance was created.
 79    /// </summary>
 39980    public DateTimeOffset CreatedAt { get; set; }
 81
 82    /// <summary>
 83    /// The timestamp when the workflow instance was last executed.
 84    /// </summary>
 39985    public DateTimeOffset UpdatedAt { get; set; }
 86
 87    /// <summary>
 88    /// The timestamp when the workflow instance was finished.
 89    /// </summary>
 39990    public DateTimeOffset? FinishedAt { get; set; }
 91}