Class CodeActionParameterDefinition
OptimaJet.Workflow.Core.Model.CodeActionParameterDefinition
Defines a field that Workflow Designer renders in a structured parameter form for an action, condition, rule, or custom activity.
Namespace: OptimaJet.Workflow.Core.Model
public class CodeActionParameterDefinitionConstructors
public CodeActionParameterDefinition() #Initializes a new CodeActionParameterDefinition with an empty CodeActionParameterDefinition.DropdownValues collection.
Properties
public string Title { get; set; } #Gets or sets the label displayed for the field.
public string Name { get; set; } #Gets or sets the name that identifies the field in the serialized parameter data.
[JsonConverter(typeof(StringEnumConverter))] [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)] [JsonConverter(typeof(SystemStringEnumConverter<ParameterType>))] public ParameterType Type { get; set; } #Gets or sets the ParameterType that determines how Workflow Designer renders the field.
public bool IsRequired { get; set; } #Gets or sets a value indicating whether Workflow Designer requires a value for the field.
public List<DropdownValue> DropdownValues { get; set; } #Gets or sets the DropdownValue options available for ParameterType.Dropdown and ParameterType.MultiSelect fields.
[JsonConverter(typeof(NewtonsoftDefaultValueJsonConverter))] [JsonConverter(typeof(SystemTextDefaultValueJsonConverter))] public string DefaultValue { get; set; } #Gets or sets the default field value encoded in the representation expected for CodeActionParameterDefinition.Type.
public string Comment { get; set; } #Gets or sets explanatory text displayed with the field.
public string CustomName { get; set; } #Gets or sets the name of the custom parameter control rendered when CodeActionParameterDefinition.Type is ParameterType.Custom.
Methods
public CodeActionParameterDefinition Clone() #Creates a copy of this definition and clones each DropdownValue in CodeActionParameterDefinition.DropdownValues.
Returns
Type
Description
CodeActionParameterDefinitionA new CodeActionParameterDefinition containing the copied values.
Exceptions
Type
Description
NullReferenceExceptionpublic static CodeActionParameterDefinition CreateTextParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a text parameter definition.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleanReturns
Type
Description
CodeActionParameterDefinitionpublic static CodeActionParameterDefinition CreateNumberParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a numeric parameter definition.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleandefaultValueStringThe initial numeric value encoded as text in CodeActionParameterDefinition.DefaultValue.
Returns
Type
Description
CodeActionParameterDefinitionpublic static CodeActionParameterDefinition CreateCheckboxParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a parameter definition rendered as a check box.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleandefaultValueStringThe initial bool value encoded as text in CodeActionParameterDefinition.DefaultValue.
Returns
Type
Description
CodeActionParameterDefinitionpublic static CodeActionParameterDefinition CreateDropdownParameter(string name, Dictionary<string, string> values, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a single-selection parameter definition from a set of option mappings.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
valuesDictionary<String, String>The option mappings whose keys initialize DropdownValue.Name and whose values initialize DropdownValue.Value.
isRequiredBooleandefaultValueStringThe option value stored in CodeActionParameterDefinition.DefaultValue and selected initially.
Returns
Type
Description
CodeActionParameterDefinitionA new CodeActionParameterDefinition whose CodeActionParameterDefinition.Type is ParameterType.Dropdown and whose CodeActionParameterDefinition.DropdownValues are populated from
values.Exceptions
Type
Description
ArgumentNullExceptionThrown when
values is null.public static CodeActionParameterDefinition CreateMultiSelectParameter(string name, Dictionary<string, string> values, string title = null, bool isRequired = false, List<string> defaultValue = null, string comment = "") #Creates a multiple-selection parameter definition from a set of option mappings.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
valuesDictionary<String, String>The option mappings whose keys initialize DropdownValue.Name and whose values initialize DropdownValue.Value.
isRequiredBooleandefaultValueList<String>The option values serialized as JSON and stored in CodeActionParameterDefinition.DefaultValue. Use null or an empty list to store an empty string.
Returns
Type
Description
CodeActionParameterDefinitionA new CodeActionParameterDefinition whose CodeActionParameterDefinition.Type is ParameterType.MultiSelect and whose CodeActionParameterDefinition.DropdownValues are populated from
values.Exceptions
Type
Description
ArgumentNullExceptionThrown when
values is null.public static CodeActionParameterDefinition CreateDateTimeParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a date-and-time parameter definition.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleandefaultValueStringThe initial date and time encoded as text in CodeActionParameterDefinition.DefaultValue.
Returns
Type
Description
CodeActionParameterDefinitionpublic static CodeActionParameterDefinition CreateDateParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a date parameter definition.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleanReturns
Type
Description
CodeActionParameterDefinitionpublic static CodeActionParameterDefinition CreateTimeParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a time parameter definition.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleanReturns
Type
Description
CodeActionParameterDefinitionpublic static CodeActionParameterDefinition CreateJsonParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a JSON parameter definition.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleanReturns
Type
Description
CodeActionParameterDefinitionpublic static CodeActionParameterDefinition CreateTextAreaParameter(string name, string title = null, bool isRequired = false, string defaultValue = "", string comment = "") #Creates a multiline text parameter definition.
Parameters
Name
Type
Description
nameStringThe name stored in CodeActionParameterDefinition.Name and used to identify the field in parameter data.
isRequiredBooleanReturns
Type
Description
CodeActionParameterDefinition