Enum Class DataResolverType

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

public enum DataResolverType extends Enum<DataResolverType>
Defines the valid data resolver types used to resolve dynamic placeholders in templates.

This enumeration provides a type-safe way to reference the different types of data that can be resolved dynamically in notifications, emails, and other templated content. Each type corresponds to a specific data source such as recipient information, task links, or step status.

Since:
1.0
Author:
Bonitasoft
  • Enum Constant Details

    • RECIPIENT_FIRSTNAME

      public static final DataResolverType RECIPIENT_FIRSTNAME
      Resolves to the first name of the recipient user.

      Retrieved from the Bonita Identity API using the user ID of the pending human task.

    • RECIPIENT_LASTNAME

      public static final DataResolverType RECIPIENT_LASTNAME
      Resolves to the last name of the recipient user.

      Retrieved from the Bonita Identity API using the user ID of the pending human task.

    • RECIPIENT_EMAIL

      public static final DataResolverType RECIPIENT_EMAIL
      Resolves to the email address of the recipient user.

      Retrieved from the Bonita Identity API contact data using the user ID of the pending human task.

    • STEP_USER_NAME

      public static final DataResolverType STEP_USER_NAME
      Resolves to the username assigned to a specific step.

      Retrieved from the PBStepProcessInstance data based on the root process instance and reference step.

    • STEP_STATUS

      public static final DataResolverType STEP_STATUS
      Resolves to the current status of a specific step.

      Retrieved from the PBStepProcessInstance data based on the root process instance and reference step.

  • Method Details

    • values

      public static DataResolverType[] 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 DataResolverType 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()
      Returns the unique string key associated with this resolver type.

      This key is used to match placeholders in templates (e.g., "recipient_firstname").

      Returns:
      The resolver key.
    • getDescription

      public String getDescription()
      Returns the description of this resolver type.
      Returns:
      The human-readable description.
    • isValid

      public static boolean isValid(String input)
      Checks if a given string corresponds to a valid enum constant, ignoring case and leading/trailing spaces.
      Parameters:
      input - The string to validate.
      Returns:
      true if the string is a valid enum constant name, false otherwise.
    • isValidKey

      public static boolean isValidKey(String key)
      Checks if a given key corresponds to a valid resolver type.

      Unlike isValid(String), this method matches against the technical key (e.g., "recipient_firstname") rather than the enum constant name.

      Parameters:
      key - The key to validate.
      Returns:
      true if the key matches a resolver type, false otherwise.
    • fromKey

      public static DataResolverType fromKey(String key)
      Finds a DataResolverType by its key.
      Parameters:
      key - The technical key to search for.
      Returns:
      The matching DataResolverType, or null if not found.
    • getAllData

      public static Map<String,String> getAllData()
      Retrieves all resolver types as a read-only Map where the key is the technical key and the value is the description.
      Returns:
      An unmodifiable map containing all resolver type data (Key -> Description).
    • getAllKeysList

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