Skip to content

Mapping Configuration

Migration of mapping path

Starting with version 1.2.0 of LemonTree.Connect, the path for loading mapping files has been changed. Previously, mapping files were loaded from the install folder of LemonTree.Connect but now mappings are loaded from %programdata%\LieberLieber\LemonTree.Connect.Polarion\mapping\.

To map Polarion work items to EA elements, LemonTree.Connect uses two separate mapping files for import and export:

  • %programdata%\LieberLieber\LemonTree.Connect.Polarion\mapping\PolarionImportMapping.xml
  • %programdata%\LieberLieber\LemonTree.Connect.Polarion\mapping\PolarionExportMapping.xml

Reset mapping files

If you want to remove your custom mapping and start over, just delete the files in the folder %programdata%\LieberLieber\LemonTree.Connect.Polarion\mapping and restart Enterprise Architect. This will restore the default mapping files from the install folder.

Default Mapping Configuration

The default import mapping has the following element and connector mappings:

EA Type EA Stereotype Polarion Type
Package heading
Class EA Specifics 1.0::requirement requirement
Class EA Specifics 1.0::requirement systemrequirement
Class EA Specifics 1.0::requirement softwarerequirement
Association relates_to
Dependency depends_on
Realization implements

The default export mapping has the following element and connector mappings:

EA Type Polarion Type
Package package
Class class
Property property
Operation operation
Parameter parameter
Interface interface
Component component
Port port
Actor actor
UseCase usecase
Association relates_to
Dependency depends_on
Realization implements

Each mapping consists of a set of “mappingRules” where you define how an element from EA corresponds to an element from Polarion.

Type Mapping

To map the type, a “matchingRule” is used, for example:

<matchingRule>
    <externalProperty name='_objectType' value='block'/>
    <myumlProperty name='_objectType' value='Class'/>
</matchingRule>

This matching rule maps the Polarion work item type “block” (externalProperty) to the EA element type “Class” (myumlProperty).

Class is a generic element type, which would also include SysML Blocks, since they derive from UML Classes. In order to define a more specific mapping the matching rule has to be extended by a stereotype:

<matchingRule>
    <externalProperty name='_objectType' value='block'/>
    <myumlProperty name='_objectType' value='Class'/>
    <myumlProperty name='_stereotype' value='SysML1.4::block' />
</matchingRule>

This specific mapping only considers SysML Blocks and ignores UML Classes.

Another example of a special type mapping is the EA element type Requirement. Since requirements do not exist in the base UML definition, a special stereotype needs to be used to map requirements:

<matchingRule>
            <externalProperty name='_objectType' value='feature' />
            <myumlProperty name='_objectType' value='Class' />
            <myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>

Supported EA Element Types

LemonTree Connect uses different terms for element types and attribute names. In the mapping file, you have to use the LemonTree Connect specific names in order to properly map those element types. Please refer to the following table below:

Type Meaning Value to use in the mapping xml
Accept Event Action AcceptEventAction
Action Pin ActionInputPin
Activity Activity
Activity Parameter ActivityParameterNode
Actor Actor
Artifact Artifact
Call Behavior Action CallBehaviorAction
Call Operation Action CallOperationAction
Component Component
Class Class
DataType DataType
Enumeration Enumeration
Object InstanceSpecification
Interaction Interaction
Interface Interface
Atomic Action OpaqueAction
Operation Operation
Package Package
Attribute, Part or Required / Provided Interface Property
Port Port
Send Signal Action SendSignalAction
Signal Signal
State State
StateMachine StateMachine
Trigger Trigger
UseCase UseCase

Attribute Mapping

To map an attribute, a “property” is used:

<property external='title' myuml='Name'/>

In this example, the Polarion attribute “title” (external) is mapped to the EA attribute “Name” (myuml).

If you want to use custom EA attributes (=tagged values), you can use the same mechanism of the property mapping, but use a double “:” in front of the attribute name:

<property external="priority" myuml="::Priority"/>

In this example, the Polarion attribute “priority” is mapped to an EA tagged value “Priority”. A tagged value will be created by the import if it does not exist. Tagged values don’t have to be created upfront.

A tagged value can be found in the EA properties on an element:

System Boundary

Alternatively, you can enable the tagged value dialog:

editors

tags

Supported EA Attributes

LemonTree Connect uses different terms for element types and attribute names. In the mapping file, you have to use the LemonTree Connect specific names in order to properly map those attributes. Please refer to the following table below:

Attribute Meaning Value to use in the mapping xml
Alias MyUmlExt:Alias
Author EA Specifics 1.0::Author
Complexity EA Specifics 1.0::Complexity
CreatedDate Element Metadata 1.0::CreatedDate
Lower Bound LowerBound
ModifiedDate Element Metadata 1.0::ModifiedDate
Multiplicity EA Specifics 1.0::Multiplicity
Name Name
Notes Documentation
Phase EA Specifics 1.0::Phase
Simple Type (like int, boolean, etc.) EA Specifics 1.0::TypeString
Status EA Specifics 1.0::Status
Stereotype EA Specifics 1.0::StereotypeString
Upper Bound UpperBound
Version EA Specifics 1.0::Version

To map EA connectors to Polarion Work Item Link Roles, the matching rule is also used:

<matchingRule>
    <externalProperty name='_linkField' value='implements' />
    <myumlProperty name="_objectType" value="Realization" />
</matchingRule>

In this example the link role “implements” from Polarion (externalProperty) is mapped to the EA connector type “Realization” (myumlProperty). In order to use Polaron Link Roles, you have to use the ID of the defined linke role in the mapping file.

Supported link types are:

  • Association
  • Dependency
  • Generalization
  • Realization

If you want to use extended connectors you have to use stereotypes. For example, a "trace" connector in EA is a dependency with the stereotype EAUML::trace. For a trace connector, the matching rule would look like this:

<matchingRule>
    <externalProperty name='_linkField' value='implements' />
    <myumlProperty name="_objectType" value="Dependency" />
    <myumlProperty name="_stereotype" value="EAUML::trace" />
</matchingRule>

Another example for a extended connector type is a "satisfy" connector from SysML:

<matchingRule>
    <externalProperty name='_linkField' value='implements' />
    <myumlProperty name="_objectType" value="Dependency" />
    <myumlProperty name="_stereotype" value="SysML1.4::satisfy" />
</matchingRule>