When using external libraries or defining your own types you usually refer to them inside your model. For example when using them as a type of an Attribute or as the type of an parameter in an Operation.

Often users tend to refer to these types with a string value in the Type field of the Attribute/Parameter.

By using a Primitve element inside your model, you can refere to it via an actual model reference. 

This has the following advantages:

  • You exaclty see which types are used inside your model
  • Typing errors can be traced back to only one source
  • Refactoring/renaming can be done by changing a single element
  • Better tracebility

Since the code generation will use the "Normalized Name" for an element/type it is not always possible to write certain type and or keyword combinations.

To do this you can use a Primitve element, since the code generation will output the name of the element as it is (not using the "Normalized Name").

Normalized element name

all illegal characters are replaced by '_'.

Legal characters:

  • first character: _ or [a-z] or [A-Z]
  • following characters: _ or [a-z] or [A-Z] or [0-9]

  • No labels