Class HistoryTimeToLiveParser


public class HistoryTimeToLiveParser extends Object
Class that encapsulates the business logic of parsing HistoryTimeToLive of different deployable resources (process, definition, case).

Furthermore, it considers notifying the users with a logging message when parsing historyTimeToLive values that are the same with the default camunda modeler TTL value (see CAMUNDA_MODELER_TTL_DEFAULT_VALUE).

  • Field Details

    • LOG

      protected static final ConfigurationLogger LOG

      protected static final int CAMUNDA_MODELER_TTL_DEFAULT_VALUE
      See Also:
    • enforceNonNullValue

      protected final boolean enforceNonNullValue
    • httlConfigValue

      protected final String httlConfigValue
  • Constructor Details

    • HistoryTimeToLiveParser

      protected HistoryTimeToLiveParser(boolean enforceNonNullValue, String httlConfigValue)
  • Method Details

    • create

      public static HistoryTimeToLiveParser create()
    • create

      public static HistoryTimeToLiveParser create(CommandContext context)
    • create

    • validate

      public void validate(Integer historyTimeToLive)
    • parse

      public Integer parse(Element processElement, String definitionKey, boolean skipEnforceTtl)
    • parse

      public Integer parse(Case caseElement, String definitionKey, boolean skipEnforceTtl)
    • parse

      public Integer parse(Decision decision, String definitionKey, boolean skipEnforceTtl)
    • parseAndValidate

      protected Integer parseAndValidate(String historyTimeToLiveString, String definitionKey, boolean skipEnforceTtl) throws NotValidException
      Parses the given HistoryTimeToLive String expression and then executes any applicable validation before returning the parsed value.
      historyTimeToLiveString - the history time to live string expression in ISO-8601 format
      definitionKey - the correlated definition key that this historyTimeToLive was fetched from (process definition key for processes, decision definition key for decisions, case definition key for cases).
      skipEnforceTtl - skips enforcing the TTL.
      the parsed integer value of history time to live
      NotValidException - in case enforcement of non-null values is on and the parsed result was null