Association or Attribute creation on the reverse is the ability to enter rules to help decide if an association or attribute must be created on reverse.

To create association or attribute creation rules on reverse


  1. In the Model Browser, select the code engineering set for reverse.
  2. Right-click the set and choose the Reverse command. The Reverse Options dialog opens. 
  3. In the Create class fields as area, select According to rules and click the  button. The Class Field Creation Rules dialog opens.
  4. Click Add to add a rule.


Managing association or attribute creation on reverse rules


The Class Field Creation Rules dialog box lists the described rules. If a type qualified name matches any rule, a specified type is created. Rules described in this dialog are executed in order from top to bottom. If one rule matches, no others are executed. The dialog allows you to add a new rule, edit or remove an old one, and reorder rules.

  • If no rules are matched, an attribute or association is created according the radio button choice at the bottom of the dialog.
  • Click Add to add an expression. 
  • Click Edit to edit a selected rule.


To define rules


You can define rules in the Rules dialog. Click the Add or Edit button in the Class Field Creation dialog to open this dialog.

The Rules dialog box description:

  • In the Create drop-down list, choose Attribute or Association on reverse if a property matches a defined criterion.
  • The Qualified Name text box supports simple search patterns, as well as '*' and '?' symbols.
  • The Qualified Name pattern can contain a qualified name of the target element including a separator of a UML separator style (::). The qualified name is counted to the first package with the «ModelLibrary» stereotype.
  • The Element Type drop-down list contains a subset of UML Type names: Any, Class, Interface, DataType, Primitive, Enumeration, Stereotype values are displayed.
  • If the <UNSPECIFIED> value is selected in the Element Type drop-down list, the element type is matched by the qualified name expression.


Sample of the association creation on reverse

These two samples show how to create associations among reversed classes, while avoiding creating associations to the used libraries (java).

If you place your classes inside the package “com::myProduct”, you must follow these Creation rules:

  • Create Association, if the property type qualified name matches “com::myProduct::*” with “all” element type
  • If the rules do not match, create class fields as attributes.

If you place your classes inside two packages “myClient” and “myServer”, the Creation rules should be:

  • Create Association, if the type name “match” path “myClient::*” with an <UNDEFINED> meta type.
  • Create Association, if the type name “match” path “myServer::*” with an <UNDEFINED> meta type.
  • If the rules do not match, create class fields as attributes.