| | | 1 | | using System.ComponentModel; |
| | | 2 | | using Elsa.Workflows.Attributes; |
| | | 3 | | using Elsa.Workflows.Models; |
| | | 4 | | using Elsa.Workflows.UIHints; |
| | | 5 | | |
| | | 6 | | namespace Elsa.Workflows.Activities.StateMachine.Models; |
| | | 7 | | |
| | | 8 | | /// <summary> |
| | | 9 | | /// Represents a directed transition between two states. |
| | | 10 | | /// </summary> |
| | | 11 | | public class Transition |
| | | 12 | | { |
| | | 13 | | /// <summary> |
| | | 14 | | /// The transition name. |
| | | 15 | | /// </summary> |
| | 143 | 16 | | public string? Name { get; set; } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// A human-readable transition name. |
| | | 20 | | /// </summary> |
| | 0 | 21 | | public string? DisplayName { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// The source state name. |
| | | 25 | | /// </summary> |
| | 201 | 26 | | public string From { get; set; } = ""; |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// The target state name. |
| | | 30 | | /// </summary> |
| | 121 | 31 | | public string To { get; set; } = ""; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// The trigger activity that starts this transition. |
| | | 35 | | /// </summary> |
| | | 36 | | [Port] |
| | | 37 | | [Browsable(false)] |
| | 130 | 38 | | public IActivity? Trigger { get; set; } |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// The condition that determines whether the transition can be taken. |
| | | 42 | | /// When this evaluates to <c>false</c>, the trigger is re-armed until another trigger wins or the condition later e |
| | | 43 | | /// </summary> |
| | | 44 | | [Input(UIHint = InputUIHints.SingleLine)] |
| | 43 | 45 | | public Input<bool>? Condition { get; set; } |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// The activity to execute after the transition is accepted. |
| | | 49 | | /// </summary> |
| | | 50 | | [Port] |
| | | 51 | | [Browsable(false)] |
| | 60 | 52 | | public IActivity? Action { get; set; } |
| | | 53 | | } |