Applicable with Version 2.5 Oct 2010
Help Version 2.5.123

Contents   Introduction   Concepts   User Help   Modeler Help   Browser Help
Administrator Help   Developer Help    Utility Help   Visio   Graphical Modeler

 

InspiredBg

Configuring UML Modeling with Visio

This section provides a detailed explanation of the repository and Visio configurations required to build a UML Static diagram using Visio and the custom UML template. It contains the following sections:

Meta model requirements

For this feature, the following EVA Netmodeler meta model is required:

AGMCGIUMLMeta1AGMCGIUMLMeta2 
AGMCGIUMLMeta3

up 

Create the Model Type

The purpose of the model type is to provide the XML which is used by EVA Netmodeler to:

  1. Determine what part of the repository to include in the model (e.g. Types, Properties and Relationships)
  2. Translate the names of the types, properties and relationships in the repository to names that the graphical modeling tool will understand (e.g. Visio Shape Master names)

For UML Modeling with Visio, we will be using a custom stencil with two Master Shapes, namely "TP_Class" and "TP_BinAssoc". These masters are derived from the "Class" and "Binary Association" masters in the "UML" template. They have been modified not to use the Visio UML subsystem because it is not possible to use the subsystem for automation purposes.

up 

Mapping the "_UML_Class" instances

We want to show all instances of the type "_UML_Class", and they must be visually modeled as "TP_Class" shapes, so we include the following XML:

                <NODEMAPPING>

                                <ARCHITYPE>_UML_Class </ARCHITYPE>

                                <VISUALTYPE>TP_Class </VISUALTYPE>

                </NODEMAPPING>

up 

Mapping the "_UML_Association" instances

We want to show all instances of the type "_UML_Association", but we want to show them as UML Binary Association connectors between the _UML_Class instances connected via the "roleAtargetclass" RelType and the "roleBtargetclass" RelType.

In other words, where EVA Netmodeler stores the _UML_Association like this:

AGMCGIUMLAssoc 

We want the visual modeling tool (Visio, in this case) to store it like this:

AGMCGIUMLAssoc1 

The Requester should therefore render the UML_Association instances as connectors, with the instance attributes as connector attributes.

In the requester code, we have three reserved words that will enable such a construct:

  • "InstanceAssociationType" – Specifies the EVA Netmodeler Type that should be treated as a special connector, rather than an object or a class.
  • "FromInstanceAssociationRel" – Specifies the RelType between the UML_Class instance and the UML_Association instance that should be used as the start-point for the connector.
  • "ToInstanceAssociationRel" – Specifies the RelType between the UML_Class instance and the UML_Association instance that should be used as the end-point for the connector.

In our case we want the "_UML_Association" type to be the "InstanceAssociationType", which is defined by the following XML:

                <NODEMAPPING>

                                <ARCHITYPE>_UML_Association </ARCHITYPE>

                                <VISUALTYPE> InstanceAssociationType</VISUALTYPE>

                </NODEMAPPING>

The "roleAtargetclass" RelType points to the start-point of our connection, to that must be the "FromInstanceAssociationRel", giving the following XML:

                <RELMAPPING>

                                <ARCHIRELTYPE>roleAtargetclass </ARCHIRELTYPE>

                                <VISUALTYPE> FromInstanceAssociationRel</VISUALTYPE>

                </RELMAPPING> 

And the "roleBtargetclass" RelType points to the end-point of our connection, so that must be the "ToInstanceAssociationRel", therefore:

                <RELMAPPING>

                                <ARCHIRELTYPE>roleBtargetclass </ARCHIRELTYPE>

                                <VISUALTYPE> ToInstanceAssociationRel</VISUALTYPE>

                </RELMAPPING> 

Lastly, because the UML_Association instance carries information about the connection between two UML_Class instances, such as connection names and cardinality; We must specify these properties in our XML in order to have them transferred into the visual modeling environment.

The TP_BinAssoc master has four custom properties which are used to draw the text on the end-points of the connector:

  • AssociationRel – The Name of the association at end-point 1
  • AssociationCard – The Cardinality of the association at end-point 1
  • BackwardsAssociationRel – The Name of the association at end-point 2
  • BackwardsAssociationCard – The Cardinality of the association at end-point 2

We must map the properties in the UML_Association instance to these property names, which will ensure that the values are transferred from the modeler to Visio and back;

                <NODEMAPPING>

                                <ARCHITYPE>_UML_Association</ARCHITYPE>

                                <VISUALTYPE>InstanceAssociationType</VISUALTYPE>

                                <NODETYPEATTRIBUTES>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE >_TP_association_rel_name</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE> AssociationRel</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>String</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE >_TP_association_cardinality</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE> AssociationCard</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>Archie2Lookup</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE >_TP_associated_rel_name</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE> BackwardsAssociationRel</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>String</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE>_ TP_associated_cardinality</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE> BackwardsAssociationCard</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>Archie2Lookup</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                </NODETYPEATTRIBUTES>

up 

Mapping the "_UML_Attribute" instances

Once again, while we want to model all instances of the UML_Attribute type, we do not want a one-to-one translation between the repository and the modeling tool; Instead of showing the repository contents like this:

AGMCGIUMLAttrib 

We want the attributes to be modeled like this:

AGMCGIUMLAttrib1  

So we want the visual environment to treat the UML_Attribute instances simply as text in the class shape, rather than as instances in their own right.

In order to enable this construct, there are three reserved words that can be used in the XML:

  • "InstanceAttribute" – The instance type to be used as an attribute.
  • "has attribute" – The RelType between the container of the attribute and the attribute itself
  • "AttributeType" – The property containing the attribute type value (i.e. "String", "Date" etcetera)

So, in order to model the UML_Attributes as properties, we must translate the "UML_Attribute" type name to "InstanceAttribute", and the "_TP_Attr_Type" property name to "AttributeType", as shown in the XML below:

                <NODEMAPPING>

                                <ARCHITYPE>_UML_Attribute </ARCHITYPE>

                                <VISUALTYPE>InstanceAttribute </VISUALTYPE>

                                <NODETYPEATTRIBUTES>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE >_TP_Attr_Type</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE> AttributeType</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>Archie2Lookup</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                </NODETYPEATTRIBUTES>

                </NODEMAPPING>

Finally, we must specify the RelType that links UML_Attribute instances to UML_Class instances as follows:

                <RELMAPPING>

                                <ARCHIRELTYPE>contains </ARCHIRELTYPE>

                                <VISUALTYPE>has attribute </VISUALTYPE>

                </RELMAPPING> 

With that, we have defined all the XML required for this Model Type. We can therefore create a new Model Type instance from within EVA Netmodeler , and add the XML into the "Model Description" property for our new instance.

Below is a full listing of the XML:

<MODELTYPE>

                <NODEMAPPING>

                                <ARCHITYPE>_UML_Class</ARCHITYPE>

                                <VISUALTYPE>TP_Class</VISUALTYPE>

                </NODEMAPPING>

                <NODEMAPPING>

                                <ARCHITYPE>_UML_Association</ARCHITYPE>

                                <VISUALTYPE>InstanceAssociationType</VISUALTYPE>

                                <NODETYPEATTRIBUTES>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE>_TP_association_rel_name</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE>AssociationRel</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>String</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE>_TP_association_cardinality</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE>AssociationCard</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>Archie2Lookup</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE>_TP_associated_rel_name</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE>BackwardsAssociationRel</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>String</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE>_TP_associated_cardinality</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE>BackwardsAssociationCard</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>Archie2Lookup</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                </NODETYPEATTRIBUTES>

                 </NODEMAPPING>

                <NODEMAPPING>

                                <ARCHITYPE>_UML_Attribute</ARCHITYPE>

                                <VISUALTYPE>InstanceAttribute</VISUALTYPE>

                                <NODETYPEATTRIBUTES>

                                                <NODETYPEATTRIBUTE>

                                                                <ARCHIATTRIBUTE>_TP_Attr_Type</ARCHIATTRIBUTE>

                                                                <VISUALATTRIBUTE>AttributeType</VISUALATTRIBUTE>

                                                                <ATTRIBUTETYPE>Archie2Lookup</ATTRIBUTETYPE>

                                                </NODETYPEATTRIBUTE>

                                </NODETYPEATTRIBUTES>

                </NODEMAPPING>

                <RELMAPPING>

                                <ARCHIRELTYPE>roleAtargetclass</ARCHIRELTYPE>

                                <VISUALTYPE>FromInstanceAssociationRel</VISUALTYPE>

                </RELMAPPING> 

                <RELMAPPING>

                                <ARCHIRELTYPE>roleBtargetclass</ARCHIRELTYPE>

                                <VISUALTYPE>ToInstanceAssociationRel</VISUALTYPE>

                </RELMAPPING> 

                <RELMAPPING>

                                <ARCHIRELTYPE>contains</ARCHIRELTYPE>

                                <VISUALTYPE>has attribute</VISUALTYPE>

                </RELMAPPING> 

</MODELTYPE>

up 

Repository view of the Model

This section shows two repository views of a UML Static Diagram in EVA Netmodeler.

This is a cross reference view of the data using inferred relationships:

AGMCGIUMLStatic

This view is useful for determining impact analysis.

The following is a UML_Association listing generated by the Report Browser. It provides a handy summary of all associations:

AGMCGIUMLReport