A Constant is a global variable with a value of a basic data type, an enumeration data type, or a map of these data types. After its value has been initialized, it remains unchanged in its context.
Constants are initialized before model variables; hence calls to model variables return the value null
. Therefore make sure not to use any context data when initializing constants.
To define a constant, do the following:
- In the GO-BPMN Explorer view, double-click the respective constant definition.
- In the Constants area of the displayed editor, click Add.
- In the Name text box, type the variable name.
- In the Type text box, type the data type of the constant value.
- Define the visibility:
- Select the Public checkbox to make the constant accessible from importing modules.
- Clear the Public checkbox to make the variable available only within the parent module.
- In the Value text box specify the value of the constant:
To call your constant in an expression, write its name.