< Summary

Information
Class: Elsa.Workflows.Runtime.Requests.DispatchWorkflowDefinitionRequest
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Requests/DispatchWorkflowDefinitionRequest.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 61
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%
.ctor(...)100%11100%
get_DefinitionVersionId()100%11100%
get_ParentWorkflowInstanceId()100%11100%
get_Input()100%11100%
get_Properties()100%11100%
get_CorrelationId()100%11100%
get_InstanceId()100%11100%
get_TriggerActivityId()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Requests/DispatchWorkflowDefinitionRequest.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Elsa.Workflows.Runtime.Requests;
 4
 5/// <summary>
 6/// A request to dispatch a workflow definition for execution.
 7/// </summary>
 8public class DispatchWorkflowDefinitionRequest
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="DispatchWorkflowDefinitionRequest"/> class.
 12    /// </summary>
 13    [JsonConstructor]
 414    public DispatchWorkflowDefinitionRequest()
 15    {
 416    }
 17
 18    /// <summary>
 19    /// Initializes a new instance of the <see cref="DispatchWorkflowDefinitionRequest"/> class.
 20    /// </summary>
 21    /// <param name="definitionVersionId">The ID of the workflow definition version to dispatch.</param>
 1922    public DispatchWorkflowDefinitionRequest(string definitionVersionId)
 23    {
 1924        DefinitionVersionId = definitionVersionId;
 1925    }
 26
 27    /// <summary>
 28    /// The ID of the workflow definition version to dispatch.
 29    /// </summary>
 4630    public string DefinitionVersionId { get; set; } = default!;
 31
 32    /// <summary>
 33    /// The ID of the parent workflow instance.
 34    /// </summary>
 4235    public string? ParentWorkflowInstanceId { get; set; }
 36
 37    /// <summary>
 38    /// Any input to pass to the workflow.
 39    /// </summary>
 4240    public IDictionary<string, object>? Input { get; set; }
 41
 42    /// <summary>
 43    /// Any properties to attach to the workflow.
 44    /// </summary>
 4245    public IDictionary<string, object>? Properties { get; set; }
 46
 47    /// <summary>
 48    /// The correlation ID to use when dispatching the workflow.
 49    /// </summary>
 4250    public string? CorrelationId { get; set; }
 51
 52    /// <summary>
 53    /// The ID to use when creating an instance of the workflow to dispatch.
 54    /// </summary>
 4655    public string? InstanceId { get; set; }
 56
 57    /// <summary>
 58    /// The ID of the activity that triggered the workflow.
 59    /// </summary>
 2360    public string? TriggerActivityId { get; set; }
 61}