| | | 1 | | using Elsa.Workflows.Models; |
| | | 2 | | using Elsa.Workflows.Runtime.Messages; |
| | | 3 | | |
| | | 4 | | namespace Elsa.Workflows.Runtime; |
| | | 5 | | |
| | | 6 | | public record StartWorkflowResponse |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Indicates whether the workflow instance can be started. |
| | | 10 | | /// </summary> |
| | 43 | 11 | | public bool CannotStart { get; set; } |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// The ID of the workflow instance. |
| | | 15 | | /// </summary> |
| | 32 | 16 | | public string? WorkflowInstanceId { get; set; } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// The status of the workflow instance. |
| | | 20 | | /// </summary> |
| | 21 | 21 | | public WorkflowStatus? Status { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// The sub-status of the workflow instance. |
| | | 25 | | /// </summary> |
| | 32 | 26 | | public WorkflowSubStatus? SubStatus { get; set; } |
| | | 27 | | |
| | 32 | 28 | | 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> |
| | 37 | 33 | | public ICollection<ActivityIncident> Incidents { get; set; } = new List<ActivityIncident>(); |
| | | 34 | | |
| | 5 | 35 | | public RunWorkflowInstanceResponse ToRunWorkflowInstanceResponse() => new() |
| | 5 | 36 | | { |
| | 5 | 37 | | WorkflowInstanceId = WorkflowInstanceId!, |
| | 5 | 38 | | Status = Status!.Value, |
| | 5 | 39 | | SubStatus = SubStatus!.Value, |
| | 5 | 40 | | Incidents = Incidents |
| | 5 | 41 | | }; |
| | | 42 | | } |