Enum Class ProcessOptionType

java.lang.Object
java.lang.Enum<ProcessOptionType>
com.bonitasoft.processbuilder.enums.ProcessOptionType
All Implemented Interfaces:
Serializable, Comparable<ProcessOptionType>, Constable

public enum ProcessOptionType extends Enum<ProcessOptionType>
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 Constants
    Enum Constant
    Description
    Represents 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 Type
    Method
    Description
    static Map<String,String>
    Retrieves all process instance states as a read-only Map where the key is the technical key and the value is the description.
    static List<String>
    Retrieves all technical keys as a read-only List of Strings.
    Gets a brief business description of the action type.
    Gets the technical key of the flow action type, typically used for internal logic and data mapping.
    static boolean
    isJsonValidForType(String actionType, String optionType, Object jsonInput)
    Validates a JSON input against the specific schema associated with the provided ProcessOptionType.
    static boolean
    isValid(String optionTypeInput)
    Checks if a given string corresponds to a valid enum constant, ignoring case and leading/trailing spaces.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PARAMETER

      public static final ProcessOptionType PARAMETER
      Represents a process parameter or configuration setting.
    • USERS

      public static final ProcessOptionType USERS
      Represents a user or a list of users involved in a process instance.
    • INPUTS

      public static final ProcessOptionType INPUTS
      Represents the initial data inputs required to start a process instance.
    • STEPS

      public static final ProcessOptionType STEPS
      Represents a step or stage in the process workflow, typically linked to a task or action.
    • STATUS

      public static final ProcessOptionType STATUS
      Represents the status or state of the process execution lifecycle.
  • Method Details

    • values

      public static ProcessOptionType[] 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

      public static ProcessOptionType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getKey

      public String getKey()
      Gets the technical key of the flow action type, typically used for internal logic and data mapping.
      Returns:
      The technical key (lowercase).
    • getDescription

      public String getDescription()
      Gets a brief business description of the action type.
      Returns:
      The description for the user interface or documentation.
    • isValid

      public static boolean isValid(String optionTypeInput)
      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:
      true if the string, after trimming and converting to uppercase, matches a valid enum constant, false otherwise (including for null, empty, or blank strings).
    • isJsonValidForType

      public static boolean isJsonValidForType(String actionType, String optionType, Object jsonInput)
      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:
      true if validation is successful and the schema check passes, false otherwise.
    • getAllData

      public static Map<String,String> 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

      public static List<String> getAllKeysList()
      Retrieves all technical keys as a read-only List of Strings.
      Returns:
      A list containing all technical keys.