| | | 1 | | using System.Text.Json.Nodes; |
| | | 2 | | using Elsa.Api.Client.Shared.Models; |
| | | 3 | | |
| | | 4 | | namespace Elsa.Api.Client.Resources.WorkflowDefinitions.Models; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Represents a linked workflow definition. |
| | | 8 | | /// </summary> |
| | | 9 | | public class WorkflowDefinition : LinkedEntity |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// The logical ID of the workflow. This ID is the same across versions. |
| | | 13 | | /// </summary> |
| | 1 | 14 | | public string DefinitionId { get; set; } = null!; |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// The name of the workflow. |
| | | 18 | | /// </summary> |
| | 1 | 19 | | public string? Name { get; set; } |
| | | 20 | | |
| | | 21 | | /// <summary> |
| | | 22 | | /// A short description of that the workflow is about. |
| | | 23 | | /// </summary> |
| | 0 | 24 | | public string? Description { get; set; } |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// The version of the tool that created this workflow. |
| | | 28 | | /// </summary> |
| | 1 | 29 | | public Version? ToolVersion { get; set; } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// A set of options for the workflow. |
| | | 33 | | /// </summary> |
| | 2 | 34 | | public WorkflowOptions Options { get; set; } = new(); |
| | | 35 | | |
| | | 36 | | /// <summary> |
| | | 37 | | /// A set of workflow variables that are accessible throughout the workflow. |
| | | 38 | | /// </summary> |
| | 2 | 39 | | public ICollection<Variable> Variables { get; set; } = new List<Variable>(); |
| | | 40 | | |
| | | 41 | | /// <summary> |
| | | 42 | | /// A set of input definitions. |
| | | 43 | | /// </summary> |
| | 2 | 44 | | public ICollection<InputDefinition> Inputs { get; set; } = new List<InputDefinition>(); |
| | | 45 | | |
| | | 46 | | /// <summary> |
| | | 47 | | /// A set of output definitions. |
| | | 48 | | /// </summary> |
| | 2 | 49 | | public ICollection<OutputDefinition> Outputs { get; set; } = new List<OutputDefinition>(); |
| | | 50 | | |
| | | 51 | | /// <summary> |
| | | 52 | | /// A set of possible outcomes for this workflow. |
| | | 53 | | /// </summary> |
| | 2 | 54 | | public ICollection<string> Outcomes { get; set; } = new List<string>(); |
| | | 55 | | |
| | | 56 | | /// <summary> |
| | | 57 | | /// Stores custom information about the workflow. Can be used to store application-specific properties to associate |
| | | 58 | | /// </summary> |
| | 2 | 59 | | public IDictionary<string, object> CustomProperties { get; set; } = new Dictionary<string, object>(); |
| | | 60 | | |
| | | 61 | | /// <summary> |
| | | 62 | | /// The name of the workflow provider that created this workflow, if any. |
| | | 63 | | /// </summary> |
| | 0 | 64 | | public string? ProviderName { get; set; } |
| | | 65 | | |
| | | 66 | | /// <summary> |
| | | 67 | | /// The name of the workflow materializer to interpret the <c>StringData</c> or <c>BinaryData</c>. |
| | | 68 | | /// </summary> |
| | 0 | 69 | | public string MaterializerName { get; set; } = null!; |
| | | 70 | | |
| | | 71 | | /// <summary> |
| | | 72 | | /// Provider-specific data. |
| | | 73 | | /// </summary> |
| | 0 | 74 | | public string? MaterializerContext { get; set; } |
| | | 75 | | |
| | | 76 | | /// <summary> |
| | | 77 | | /// The root activity of the workflow. |
| | | 78 | | /// </summary> |
| | 2 | 79 | | public JsonObject Root { get; set; } = null!; |
| | | 80 | | |
| | | 81 | | /// <summary> |
| | | 82 | | /// An option to use the workflow as a readonly workflow. |
| | | 83 | | /// </summary> |
| | 1 | 84 | | public bool IsReadonly { get; set; } |
| | | 85 | | } |