< Summary

Information
Class: Elsa.Workflows.Runtime.StartWorkflowResponse
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Responses/StartWorkflowResponse.cs
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 42
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_CannotStart()100%11100%
get_WorkflowInstanceId()100%11100%
get_Status()100%11100%
get_SubStatus()100%11100%
get_Bookmarks()100%11100%
get_Incidents()100%11100%
ToRunWorkflowInstanceResponse()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Responses/StartWorkflowResponse.cs

#LineLine coverage
 1using Elsa.Workflows.Models;
 2using Elsa.Workflows.Runtime.Messages;
 3
 4namespace Elsa.Workflows.Runtime;
 5
 6public record StartWorkflowResponse
 7{
 8    /// <summary>
 9    /// Indicates whether the workflow instance can be started.
 10    /// </summary>
 4311    public bool CannotStart { get; set; }
 12
 13    /// <summary>
 14    /// The ID of the workflow instance.
 15    /// </summary>
 3216    public string? WorkflowInstanceId { get; set; }
 17
 18    /// <summary>
 19    /// The status of the workflow instance.
 20    /// </summary>
 2121    public WorkflowStatus? Status { get; set; }
 22
 23    /// <summary>
 24    /// The sub-status of the workflow instance.
 25    /// </summary>
 3226    public WorkflowSubStatus? SubStatus { get; set; }
 27
 3228    public ICollection<Bookmark> Bookmarks { get; set; } = new List<Bookmark>();
 29
 30    /// <summary>
 31    /// Any incidents that occurred during the execution of the workflow instance.
 32    /// </summary>
 3733    public ICollection<ActivityIncident> Incidents { get; set; } = new List<ActivityIncident>();
 34
 535    public RunWorkflowInstanceResponse ToRunWorkflowInstanceResponse() => new()
 536    {
 537        WorkflowInstanceId = WorkflowInstanceId!,
 538        Status = Status!.Value,
 539        SubStatus = SubStatus!.Value,
 540        Incidents = Incidents
 541    };
 42}