| | | 1 | | using Elsa.Workflows.Memory; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Workflows.Options; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Represents options for scheduling a work item. |
| | | 7 | | /// </summary> |
| | | 8 | | public class ScheduleWorkOptions |
| | | 9 | | { |
| | | 10 | | /// <summary>The callback to invoke when the work item has completed.</summary> |
| | 8584 | 11 | | public ActivityCompletionCallback? CompletionCallback { get; set; } |
| | | 12 | | |
| | | 13 | | /// <summary>A tag that can be used to identify the work item.</summary> |
| | 4963 | 14 | | 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 |
| | 4965 | 17 | | 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> |
| | 2814 | 22 | | 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> |
| | 2814 | 27 | | public bool PreventDuplicateScheduling { get; set; } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Input to send to the workflow. |
| | | 31 | | /// </summary> |
| | 2826 | 32 | | 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> |
| | 3609 | 39 | | 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> |
| | 2814 | 46 | | public string? SchedulingWorkflowInstanceId { get; set; } |
| | | 47 | | } |