Rational Developer for System z

Including your own primitive types in the process

Consider including your own primitive types in the UML-to-COBOL process.

About this task

Most users define their own sets of primitive types in order to define basic business elementary types. Most often these types are similar in concept to the ones we provide. Since our process takes advantage of the primitive types provided by the solution, you need to customize the solution to take into account your primitive type instead of the provided ones and specify which are the appropriate stereotypes for the new primitive types. Or you can add a transformation in order to obtain a model that uses the primitive types of the solution.

Since the UML-to-COBOL process provides and takes advantage of the general purpose primitive types, the process provides a mechanism to take into account the primitive types already defined in an organization and map them to the stereotypes of the process.

To customize the mapping:

Procedure

  1. Edit an XML mapping file in an installed plug-in.
  2. Locate the com.ibm.etools.umlx.udp.cobol.binding plug-in. In the config folder of the plug-in, are the two following configuration files:
    • Default_Mapping.xml describes the default or current mapping.
    • Custom_Mapping.xml is where you can add custom mappings between specific primitive types and the stereotypes provided by the UML-to-COBOL process.
    Both of these files are considered. If the Custom_Mapping.xml file specifies the same primitive types that the default mapping, customized mapping will be taken into account. Note that to facilitate the application of the stereotypes, the appropriate stereotypes can be automatically applied by using a pattern.

What to do next

See Automating stereotypes application on class properties.

Feedback