< Summary

Information
Class: Elsa.Workflows.State.WorkflowState
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/State/WorkflowState.cs
Line coverage
100%
Covered lines: 23
Uncovered lines: 0
Coverable lines: 23
Total lines: 127
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_Id()100%11100%
get_DefinitionId()100%11100%
get_DefinitionVersionId()100%11100%
get_DefinitionVersion()100%11100%
get_ParentWorkflowInstanceId()100%11100%
get_CorrelationId()100%11100%
get_Name()100%11100%
get_Status()100%11100%
get_SubStatus()100%11100%
get_IsExecuting()100%11100%
get_Bookmarks()100%11100%
get_Incidents()100%11100%
get_IsSystem()100%11100%
get_CompletionCallbacks()100%11100%
get_ActivityExecutionContexts()100%11100%
get_ScheduledActivities()100%11100%
get_ExecutionLogSequence()100%11100%
get_Input()100%11100%
get_Output()100%11100%
get_Properties()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.Core/State/WorkflowState.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations.Schema;
 2using Elsa.Workflows.Models;
 3
 4namespace Elsa.Workflows.State;
 5
 6/// <summary>
 7/// Represents the current state of a workflow.
 8/// </summary>
 9public class WorkflowState
 10{
 11    /// <summary>
 12    /// Gets or sets the ID.
 13    /// </summary>
 181114    public string Id { get; set; } = null!;
 15
 16    /// <summary>
 17    /// The workflow definition ID.
 18    /// </summary>
 151319    public string DefinitionId { get; set; } = null!;
 20
 21    /// <summary>
 22    /// The workflow definition version ID.
 23    /// </summary>
 151424    public string DefinitionVersionId { get; set; } = null!;
 25
 26    /// <summary>
 27    /// The workflow definition version.
 28    /// </summary>
 151329    public int DefinitionVersion { get; set; }
 30
 31    /// <summary>
 32    /// The ID of the parent workflow.
 33    /// </summary>
 154034    public string? ParentWorkflowInstanceId { get; set; }
 35
 36    /// <summary>
 37    /// The correlation ID of the workflow, if any.
 38    /// </summary>
 166439    public string? CorrelationId { get; set; }
 40
 41    /// <summary>
 42    /// Gets or sets the name of the workflow instance.
 43    /// </summary>
 153744    public string? Name { get; set; }
 45
 46    /// <summary>
 47    /// The status of the workflow.
 48    /// </summary>
 342649    public WorkflowStatus Status { get; set; }
 50
 51    /// <summary>
 52    /// The sub status of the workflow.
 53    /// </summary>
 181354    public WorkflowSubStatus SubStatus { get; set; }
 55
 56    /// <summary>
 57    /// Gets or sets a value indicating whether the workflow instance is actively executing.
 58    /// </summary>
 146959    public bool IsExecuting { get; set; }
 60
 61    /// <summary>
 62    /// Collected bookmarks.
 63    /// </summary>
 64    [NotMapped]
 195165    public ICollection<Bookmark> Bookmarks { get; set; } = new List<Bookmark>();
 66
 67    /// <summary>
 68    /// A collection of incidents that may have occurred during execution.
 69    /// </summary>
 253170    public ICollection<ActivityIncident> Incidents { get; set; } = new List<ActivityIncident>();
 71
 72    /// <summary>
 73    /// Gets or sets the value indicating whether the workflow is a system workflow.
 74    /// </summary>
 151375    public bool IsSystem { get; set; }
 76
 77    /// <summary>
 78    /// A list of callbacks that activities registered in order to be notified when the activities they scheduled comple
 79    /// </summary>
 167080    public ICollection<CompletionCallbackState> CompletionCallbacks { get; set; } = new List<CompletionCallbackState>();
 81
 82    /// <summary>
 83    /// A flattened list of <see cref="ActivityExecutionContextState"/> objects, representing the various active "call s
 84    /// </summary>
 85    [NotMapped]
 180586    public ICollection<ActivityExecutionContextState> ActivityExecutionContexts { get; set; } = new List<ActivityExecuti
 87
 88    /// <summary>
 89    /// A list of scheduled activities.
 90    /// </summary>
 167091    public ICollection<ActivityWorkItemState> ScheduledActivities { get; set; } = new List<ActivityWorkItemState>();
 92
 93    /// <summary>
 94    /// The current execution log sequence number.
 95    /// </summary>
 102996    public long ExecutionLogSequence { get; set; }
 97
 98    /// <summary>
 99    /// A dictionary of inputs sent to the workflow.
 100    /// </summary>
 1755101    public IDictionary<string, object> Input { get; set; } = new Dictionary<string, object>();
 102
 103    /// <summary>
 104    /// A dictionary of outputs produced by the workflow.
 105    /// </summary>
 1748106    public IDictionary<string, object> Output { get; set; } = new Dictionary<string, object>();
 107
 108    /// <summary>
 109    /// A global property bag that contains properties set by application code and/or activities.
 110    /// </summary>
 3386111    public IDictionary<string, object> Properties { get; set; } = new Dictionary<string, object>();
 112
 113    /// <summary>
 114    /// The created time of the workflow.
 115    /// </summary>
 1765116    public DateTimeOffset CreatedAt { get; set; }
 117
 118    /// <summary>
 119    /// The last updated time of the workflow.
 120    /// </summary>
 1639121    public DateTimeOffset UpdatedAt { get; set; }
 122
 123    /// <summary>
 124    /// The finished time of the workflow.
 125    /// </summary>
 1486126    public DateTimeOffset? FinishedAt { get; set; }
 127}