Groovy, Javascript, or Jython scripting language can be used to create a validation rule which are used to validate elements in your model. The advantage of using script validation rules is that it is not necessary to compile and store them in a classpath. Oftentimes, the code is compact and simple.
How to create a a script validation rule
- Create a constraint.
 - Set the stereotype «UML Standard Profile::Validation Profile::validationRule» for the validation rule.
 - Set the severity level, error message, and abbreviation.
 - Specify constrained element(s).
 - Specify the specification language (Groovy, Javascript, or Jython).
 - Enter the validation code in the selected language.
 
Related pages