Enum Class ProcessOptionType
- All Implemented Interfaces:
Serializable,Comparable<ProcessOptionType>,Constable
Defines the valid option types for a process.
This enumeration is used to categorize different components within a process, such as parameters, users, inputs, steps, and status. It improves code clarity and reduces the risk of errors from using hard-coded strings.
- Since:
- 1.0
- Author:
- Bonitasoft
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents the initial data inputs required to start a process instance.Represents a process parameter or configuration setting.Represents the status or state of the process execution lifecycle.Represents a step or stage in the process workflow, typically linked to a task or action.Represents a user or a list of users involved in a process instance. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves all process instance states as a read-only Map where the key is the technical key and the value is the description.Retrieves all technical keys as a read-only List of Strings.Gets a brief business description of the action type.getKey()Gets the technical key of the flow action type, typically used for internal logic and data mapping.static booleanisJsonValidForType(String actionType, String optionType, Object jsonInput) Validates a JSON input against the specific schema associated with the provided ProcessOptionType.static booleanChecks if a given string corresponds to a valid enum constant, ignoring case and leading/trailing spaces.static ProcessOptionTypeReturns the enum constant of this class with the specified name.static ProcessOptionType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PARAMETER
Represents a process parameter or configuration setting. -
USERS
Represents a user or a list of users involved in a process instance. -
INPUTS
Represents the initial data inputs required to start a process instance. -
STEPS
Represents a step or stage in the process workflow, typically linked to a task or action. -
STATUS
Represents the status or state of the process execution lifecycle.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getKey
Gets the technical key of the flow action type, typically used for internal logic and data mapping.- Returns:
- The technical key (lowercase).
-
getDescription
Gets a brief business description of the action type.- Returns:
- The description for the user interface or documentation.
-
isValid
Checks if a given string corresponds to a valid enum constant, ignoring case and leading/trailing spaces.- Parameters:
optionTypeInput- The string to validate (e.g., "users", " STEPS ").- Returns:
trueif the string, after trimming and converting to uppercase, matches a valid enum constant,falseotherwise (including for null, empty, or blank strings).
-
isJsonValidForType
Validates a JSON input against the specific schema associated with the provided ProcessOptionType.This method delegates the validation to the centralized
JsonSchemaValidator.- Parameters:
actionType- The action being performed (e.g., "DELETE", "INSERT", "UPDATE").optionType- The string name of the ProcessOptionType (e.g., "STEPS", "USERS").jsonInput- The JSON content to validate, expected as a Map/Object from the process context.- Returns:
trueif validation is successful and the schema check passes,falseotherwise.
-
getAllData
Retrieves all process instance states as a read-only Map where the key is the technical key and the value is the description.- Returns:
- A map containing all process state data (Key -> Description).
-
getAllKeysList
Retrieves all technical keys as a read-only List of Strings.- Returns:
- A list containing all technical keys.
-