< Summary

Information
Class: Elsa.Api.Client.Resources.WorkflowInstances.Models.WorkflowState
Assembly: Elsa.Api.Client
File(s): /home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/WorkflowInstances/Models/WorkflowState.cs
Line coverage
87%
Covered lines: 14
Uncovered lines: 2
Coverable lines: 16
Total lines: 90
Line coverage: 87.5%
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_DefinitionVersion()100%11100%
get_CorrelationId()100%210%
get_Status()100%11100%
get_SubStatus()100%11100%
get_Bookmarks()100%11100%
get_Incidents()100%11100%
get_Fault()100%210%
get_CompletionCallbacks()100%11100%
get_ActivityExecutionContexts()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/clients/Elsa.Api.Client/Resources/WorkflowInstances/Models/WorkflowState.cs

#LineLine coverage
 1using Elsa.Api.Client.Resources.WorkflowInstances.Enums;
 2using Elsa.Api.Client.Shared.Models;
 3
 4namespace Elsa.Api.Client.Resources.WorkflowInstances.Models;
 5
 6/// <summary>
 7/// Represents the current state of a workflow.
 8/// </summary>
 9public class WorkflowState : Entity
 10{
 11    /// <summary>
 12    /// The workflow definition ID.
 13    /// </summary>
 314    public string DefinitionId { get; set; } = default!;
 15
 16    /// <summary>
 17    /// The workflow definition version.
 18    /// </summary>
 319    public int DefinitionVersion { get; set; }
 20
 21    /// <summary>
 22    /// The correlation ID of the workflow, if any.
 23    /// </summary>
 024    public string? CorrelationId { get; set; }
 25
 26    /// <summary>
 27    /// The status of the workflow.
 28    /// </summary>
 329    public WorkflowStatus Status { get; set; }
 30
 31    /// <summary>
 32    /// The sub status of the workflow.
 33    /// </summary>
 334    public WorkflowSubStatus SubStatus { get; set; }
 35
 36    /// <summary>
 37    /// Collected bookmarks.
 38    /// </summary>
 639    public ICollection<Bookmark> Bookmarks { get; set; } = new List<Bookmark>();
 40
 41    /// <summary>
 42    /// A collection of incidents that may have occurred during execution.
 43    /// </summary>
 644    public ICollection<ActivityIncident> Incidents { get; set; } = new List<ActivityIncident>();
 45
 46    /// <summary>
 47    /// The serialized workflow state, if any.
 48    /// </summary>
 049    public WorkflowFaultState? Fault { get; set; }
 50
 51    /// <summary>
 52    /// A list of callbacks that activities registered in order to be notified when the activities they scheduled comple
 53    /// </summary>
 654    public ICollection<CompletionCallbackState> CompletionCallbacks { get; set; } = new List<CompletionCallbackState>();
 55
 56    /// <summary>
 57    /// A flattened list of <see cref="ActivityExecutionContextState"/> objects, representing the various active "call s
 58    /// </summary>
 659    public ICollection<ActivityExecutionContextState> ActivityExecutionContexts { get; set; } = new List<ActivityExecuti
 60
 61    /// <summary>
 62    /// A dictionary of inputs sent to the workflow.
 63    /// </summary>
 664    public IDictionary<string, object> Input { get; set; } = new Dictionary<string, object>();
 65
 66    /// <summary>
 67    /// A dictionary of outputs produced by the workflow.
 68    /// </summary>
 669    public IDictionary<string, object> Output { get; set; } = new Dictionary<string, object>();
 70
 71    /// <summary>
 72    /// A global property bag that contains properties set by application code and/or activities.
 73    /// </summary>
 674    public IDictionary<string, object> Properties { get; set; } = new Dictionary<string, object>();
 75
 76    /// <summary>
 77    /// The created time of the workflow.
 78    /// </summary>
 379    public DateTimeOffset CreatedAt { get; set; }
 80
 81    /// <summary>
 82    /// The last updated time of the workflow.
 83    /// </summary>
 384    public DateTimeOffset UpdatedAt { get; set; }
 85
 86    /// <summary>
 87    /// The finished time of the workflow.
 88    /// </summary>
 389    public DateTimeOffset? FinishedAt { get; set; }
 90}