< Summary

Information
Class: Elsa.Workflows.State.ActivityExecutionContextState
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/State/ActivityExecutionContextState.cs
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 88
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
.ctor()100%11100%
get_Id()100%11100%
get_ParentContextId()100%11100%
get_ScheduledActivityNodeId()100%11100%
get_OwnerActivityNodeId()100%11100%
get_Properties()100%11100%
get_Metadata()100%11100%
get_ActivityState()100%11100%
get_DynamicVariables()100%11100%
get_Status()100%11100%
get_IsExecuting()100%11100%
get_FaultCount()100%11100%
get_StartedAt()100%11100%
get_CompletedAt()100%11100%
get_Tag()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/State/ActivityExecutionContextState.cs

#LineLine coverage
 1using Elsa.Workflows.Memory;
 2
 3namespace Elsa.Workflows.State;
 4
 5/// <summary>
 6/// A serializable shape of <see cref="ActivityExecutionContext"/>.
 7/// </summary>
 8public class ActivityExecutionContextState
 9{
 10    // ReSharper disable once EmptyConstructor
 11    // Required for JSON serialization configured with reference handling.
 12    /// <summary>
 13    /// Constructor.
 14    /// </summary>
 77915    public ActivityExecutionContextState()
 16    {
 77917    }
 18
 19    /// <summary>
 20    /// The ID of the activity instance.
 21    /// </summary>
 146022    public string Id { get; set; } = default!;
 23
 24    /// <summary>
 25    /// The ID of the parent of the activity instance.
 26    /// </summary>
 141227    public string? ParentContextId { get; set; }
 28
 29    /// <summary>
 30    /// The node ID of the scheduled activity.
 31    /// </summary>
 136832    public string ScheduledActivityNodeId { get; set; } = default!;
 33
 34    /// <summary>
 35    /// The node ID of the activity that owns the scheduled activity.
 36    /// </summary>
 115437    public string? OwnerActivityNodeId { get; set; }
 38
 39    /// <summary>
 40    /// A bag of properties.
 41    /// </summary>
 215642    public IDictionary<string, object> Properties { get; set; } = new Dictionary<string, object>();
 43
 44    /// <summary>
 45    /// A bag of metadata.
 46    /// </summary>
 214747    public IDictionary<string, object> Metadata { get; set; } = new Dictionary<string, object>();
 48
 49    /// <summary>
 50    /// The evaluated values of the activity's properties.
 51    /// </summary>
 150152    public IDictionary<string, object>? ActivityState { get; set; }
 53
 54    /// <summary>
 55    /// A list of dynamically created variables.
 56    /// </summary>
 214757    public ICollection<Variable> DynamicVariables { get; set; } = new List<Variable>();
 58
 59    /// <summary>
 60    /// The status of the activity.
 61    /// </summary>
 136862    public ActivityStatus Status { get; set; }
 63
 64    /// <summary>
 65    /// Gets or sets a value indicating whether the activity is actively executing.
 66    /// </summary>
 136867    public bool IsExecuting { get; set; }
 68
 69    /// <summary>
 70    /// The number of faults recorded by this activity for itself and descendants.
 71    /// </summary>
 136872    public int FaultCount { get; set; }
 73
 74    /// <summary>
 75    /// The time at which the activity execution began.
 76    /// </summary>
 136877    public DateTimeOffset StartedAt { get; set; }
 78
 79    /// <summary>
 80    /// The time at which the activity execution completed.
 81    /// </summary>
 119482    public DateTimeOffset? CompletedAt { get; set; }
 83
 84    /// <summary>
 85    /// An optional tag to associate with the activity execution.
 86    /// </summary>
 116387    public object? Tag { get; set; }
 88}