Class TriggerDefinition
OptimaJet.Workflow.Core.Model.TriggerDefinition
Represents a transition trigger assigned to TransitionDefinition.Trigger in a process scheme.
Namespace: OptimaJet.Workflow.Core.Model
public class TriggerDefinitionConstructors
public TriggerDefinition(TriggerType type) #Initializes a new TriggerDefinition with
type.Parameters
Name
Type
Description
Properties
[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(SystemStringEnumConverter<TriggerType>))] public TriggerType Type { get; set; } #Gets or sets the TriggerType that determines what causes the transition to be evaluated.
public string NameRef { get; } #Gets the name of the CommandDefinition or TimerDefinition associated with this trigger.
public CommandDefinition Command { get; set; } #Gets or sets the CommandDefinition associated with a TriggerType.Command trigger.
public TimerDefinition Timer { get; set; } #Gets or sets the TimerDefinition associated with a TriggerType.Timer trigger.
public static TriggerDefinition Auto { get; } #Methods
public static TriggerDefinition Create(string type) #Parameters
Name
Type
Description
Returns
Type
Description
TriggerDefinitionA new TriggerDefinition with the parsed TriggerDefinition.Type.
Exceptions
Type
Description
ArgumentNullExceptiontype is null.ArgumentExceptiontype is empty, contains only white-space characters, or cannot be parsed as a TriggerType value.OverflowExceptiontype represents a numeric value outside the range of the underlying type.Remarks
Name parsing is case-sensitive.
public static TriggerDefinition CreateTimerTrigger(TimerDefinition timer) #Creates a TriggerType.Timer trigger associated with
timer.Parameters
Name
Type
Description
Returns
Type
Description
TriggerDefinitionA new TriggerDefinition associated with
timer.public static TriggerDefinition CreateCommandTrigger(CommandDefinition command) #Creates a TriggerType.Command trigger associated with
command.Parameters
Name
Type
Description
Returns
Type
Description
TriggerDefinitionA new TriggerDefinition associated with
command.public TriggerDefinition Clone() #Creates a copy of this trigger and clones its associated CommandDefinition and TimerDefinition instances when present.
Returns
Type
Description
TriggerDefinitionA new TriggerDefinition containing the copied trigger data.
public TriggerDefinition Clone(List<CommandDefinition> commandDefinitions, List<TimerDefinition> timerDefinitions) #Creates a copy of this trigger and rebinds TriggerDefinition.Command and TriggerDefinition.Timer by matching command and timer names in
commandDefinitions and timerDefinitions.Parameters
Name
Type
Description
commandDefinitionsList<CommandDefinition>The CommandDefinition instances used to replace TriggerDefinition.Command.
timerDefinitionsList<TimerDefinition>The TimerDefinition instances used to replace TriggerDefinition.Timer.
Returns
Type
Description
TriggerDefinitionExceptions
Type
Description
ArgumentNullExceptionTriggerDefinition.Command is assigned and
commandDefinitions is null, or TriggerDefinition.Timer is assigned and timerDefinitions is null.InvalidOperationExceptionA required collection contains no definition with the matching command or timer name.