< 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: 15
Uncovered lines: 0
Coverable lines: 15
Total lines: 81
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%
get_SchedulingActivityExecutionId()100%11100%
get_SchedulingWorkflowInstanceId()100%11100%
get_SchedulingCallStackDepth()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>
 2022    public DispatchWorkflowDefinitionRequest(string definitionVersionId)
 23    {
 2024        DefinitionVersionId = definitionVersionId;
 2025    }
 26
 27    /// <summary>
 28    /// The ID of the workflow definition version to dispatch.
 29    /// </summary>
 4930    public string DefinitionVersionId { get; set; } = default!;
 31
 32    /// <summary>
 33    /// The ID of the parent workflow instance.
 34    /// </summary>
 4335    public string? ParentWorkflowInstanceId { get; set; }
 36
 37    /// <summary>
 38    /// Any input to pass to the workflow.
 39    /// </summary>
 4440    public IDictionary<string, object>? Input { get; set; }
 41
 42    /// <summary>
 43    /// Any properties to attach to the workflow.
 44    /// </summary>
 4345    public IDictionary<string, object>? Properties { get; set; }
 46
 47    /// <summary>
 48    /// The correlation ID to use when dispatching the workflow.
 49    /// </summary>
 4550    public string? CorrelationId { get; set; }
 51
 52    /// <summary>
 53    /// The ID to use when creating an instance of the workflow to dispatch.
 54    /// </summary>
 4755    public string? InstanceId { get; set; }
 56
 57    /// <summary>
 58    /// The ID of the activity that triggered the workflow.
 59    /// </summary>
 2460    public string? TriggerActivityId { get; set; }
 61
 62    /// <summary>
 63    /// The ID of the activity execution context that scheduled this workflow execution (for cross-workflow call stack t
 64    /// This is set when a parent workflow invokes this workflow via DispatchWorkflow.
 65    /// </summary>
 2866    public string? SchedulingActivityExecutionId { get; set; }
 67
 68    /// <summary>
 69    /// The workflow instance ID of the parent workflow that scheduled this workflow execution.
 70    /// This is set when crossing workflow boundaries.
 71    /// </summary>
 2872    public string? SchedulingWorkflowInstanceId { get; set; }
 73
 74    /// <summary>
 75    /// The call stack depth of the scheduling activity execution context.
 76    /// This is used to calculate the call stack depth when the scheduling context is not present
 77    /// in ActivityExecutionContexts (e.g., for cross-workflow invocations).
 78    /// Should be set to the depth of the scheduling activity (not depth + 1, as the increment is applied automatically)
 79    /// </summary>
 2880    public int? SchedulingCallStackDepth { get; set; }
 81}