It is possible to declare and use a local variable within an expression. See below for an example of such local variables.

In the example above three local variables are used to determine whether a year is a leap year or not. Since these variables are only used within this expression and do not play any other role within the business model whatsoever, local variables are the best fit. It would have been possible to use attributes or reusable expressions for these variables, but that would only pollute the domain model.


  • No labels