< Summary

Information
Class: Elsa.Workflows.Options.ScheduleWorkOptions
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Options/ScheduleWorkOptions.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 47
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_CompletionCallback()100%11100%
get_Tag()100%11100%
get_Variables()100%11100%
get_ExistingActivityExecutionContext()100%11100%
get_PreventDuplicateScheduling()100%11100%
get_Input()100%11100%
get_SchedulingActivityExecutionId()100%11100%
get_SchedulingWorkflowInstanceId()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Options/ScheduleWorkOptions.cs

#LineLine coverage
 1using Elsa.Workflows.Memory;
 2
 3namespace Elsa.Workflows.Options;
 4
 5/// <summary>
 6/// Represents options for scheduling a work item.
 7/// </summary>
 8public class ScheduleWorkOptions
 9{
 10    /// <summary>The callback to invoke when the work item has completed.</summary>
 858411    public ActivityCompletionCallback? CompletionCallback { get; set; }
 12
 13    /// <summary>A tag that can be used to identify the work item.</summary>
 496314    public object? Tag { get; set; }
 15
 16    /// <summary>A collection of variables to declare in the activity execution context that will be created for this wo
 496517    public ICollection<Variable>? Variables { get; set; }
 18
 19    /// <summary>
 20    /// An existing activity execution context to use instead of creating a new one.
 21    /// </summary>
 281422    public ActivityExecutionContext? ExistingActivityExecutionContext { get; set; }
 23
 24    /// <summary>
 25    /// A flag indicating whether the work item should be scheduled even if a work item with the same tag already exists
 26    /// </summary>
 281427    public bool PreventDuplicateScheduling { get; set; }
 28
 29    /// <summary>
 30    /// Input to send to the workflow.
 31    /// </summary>
 282632    public IDictionary<string, object>? Input { get; set; }
 33
 34    /// <summary>
 35    /// The ID of the activity execution context that scheduled this work item.
 36    /// This represents the temporal/execution predecessor that directly triggered execution of this activity,
 37    /// distinct from the structural parent (<see cref="ExistingActivityExecutionContext"/> or Owner).
 38    /// </summary>
 360939    public string? SchedulingActivityExecutionId { get; set; }
 40
 41    /// <summary>
 42    /// The workflow instance ID of the workflow that scheduled this work item.
 43    /// This is set when crossing workflow boundaries (e.g., via ExecuteWorkflow or DispatchWorkflow).
 44    /// For activities within the same workflow instance, this will be null.
 45    /// </summary>
 281446    public string? SchedulingWorkflowInstanceId { get; set; }
 47}