Package org.jbpm.process.core.context.variable

## Class VariableViolationException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.jbpm.process.core.context.variable.VariableViolationException

- All Implemented Interfaces:
    `Serializable`

      public class VariableViolationException
      extends RuntimeException

  Thrown when there is any kind of variable violation such as missing required variable or attempt to set already defined readonly variable.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `VariableViolationException​(Long processInstanceId, String variableName, String errorMessage)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getErrorMessage()` | Returns error message associated with this failure.
    `Long` | `getProcessInstanceId()` | Returns process instance id of the instance that failed.
    `String` | `getVariableName()` | Returns variable name that was violated

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### VariableViolationException

          public VariableViolationException​(Long processInstanceId,
                                            String variableName,
                                            String errorMessage)

  - ### Method Detail

    - #### getProcessInstanceId

          public Long getProcessInstanceId()

      Returns process instance id of the instance that failed.
      Returns:
        process instance id

    - #### getVariableName

          public String getVariableName()

      Returns variable name that was violated
      Returns:
        variable name

    - #### getErrorMessage

          public String getErrorMessage()

      Returns error message associated with this failure.
      Returns:
        error message