Annotation Type StateVar


  • @Retention(RUNTIME)
    @Target(PARAMETER)
    public @interface StateVar
    Used for state handler method parameters. Annotated parameters are automatically populated from the workflow instance variables and persisted after processing the state handler method.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      The name of the workflow instance variable.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean instantiateIfNotExists
      Initializes the variable using default constructor (or zero value for primitive types) if the variable does not exist.
      boolean readOnly
      Makes the variable readonly in the state handler method.
    • Element Detail

      • value

        String value
        The name of the workflow instance variable.
        Returns:
        The name of the variable.
      • readOnly

        boolean readOnly
        Makes the variable readonly in the state handler method.
        Returns:
        True when variable should not be modified, false otherwise.
        Default:
        false
      • instantiateIfNotExists

        boolean instantiateIfNotExists
        Initializes the variable using default constructor (or zero value for primitive types) if the variable does not exist. Used to ensure that the variable value is never null.
        Returns:
        True if non-existing variables should be initialized, false otherwise.
        Default:
        false