Expressions can access named elements defined in the model, which cannot be defined directly in the Expression Language.
Such model elements include the following:
Modules represent a structuring unit similar to a package and contain all the resources with model elements. A module can use resources of another module only if it imports the module–similarly to packages in Java. The module importing mechanism is described in the GO-BPMN Modeling Language guide.
If you want to reference an element from another module, the name of the entity must be preceded by the module name and the ::
operator.
<MODULE_NAME>::<ELEMENT_NAME>
<QUERY_OR_FORM_NAME>(<PARAMETER_1>, <PARAMETER_2>)
Note that parameters can be themselves expressions that return the data type defined as the parameter type. If a parameter is of the String type, the parameter can be an expression that results in a String object.
getName(getProcessName()+"#"+getId())
Note: Other elements are implemented as functions and are called in the same way. This includes queries and forms.
Variables from parent namespaces are defined in a variable definition file (global module variables), or directly on the elements representing the parent namespace, for example, a sub-process, a form, etc.
Variables from parent namespaces are referred to by their name with no special notation.
Records and their fields are defined in a data type definition file.
Records are referred to by their name with no special notation. To access record fields, use the dot operator: \<RECORD_NAME\>.\<RECORD_FIELD\>
Note that Record properties, fields on related Records, are accessed in the same way.
Constants are named values of the enumeration data type, or maps of these data types. After their value has been initialized, it remains unchanged during the rest of the runtime. Initialization expressions of constants can use other constants.
Constants cannot be defined in the Expression Language directly. To call a constant in an expression, use its name, for example, "This is the current date format: " + DATE_FORMAT
.