Mappings are basic transformations of UCM Scenarios objects to their equivalent TDL representation. Such mappings can only be made for elements that are found in both UCM and TDL notations. Since the id attribute of a ModelElement has no equivalent in TDL it is not kept after the transformation.

Basics of the transformation

To begin, the scenario traversal algorithm flattens the URNspec of a UCM map a URN map where each scenario has no alternative. Then a ScenarioSpec object is extracted with a Traversal Listener from the traversal and sent to the transformation in TDL algorithm. A TDL Package is then created to be the parent container for other TDL objects.


UCM Scenario's ScenarioDef objects are mapped to TestDescription objects in TDL. Each scenario get's exported to a single file with the name of the ScenarioDef as filename. A TDL "main" Block contains all the Behaviour of one TestDescription.


UCM Scenario's Component objects are mapped to ComponentInstance objects in TDL. The name attribute of a Component is also used to determine to ComponentType of the generated ComponentInstance following the convention below:

- The name of a Component must follow this format: ComponentName : ComponentType

Where ComponentName will be assigned to the name of the generated ComponentInstance and ComponentType will be assigned to it's corresponding ComponentType 's name. The transformation supports the conversion of Component that don't specify their ComponentType in their name . In this case, the default ComponentType 's name that will be assigned to this generated ComponentInstance will be the ComponentName + "Type".

- To be compatible with the PlantUML visualisation tool (TBA), all special characters (e.g. !@#$%^&*(), etc.) and white spaces are removed from the name of the Component during the transformation and replaced with void.

Event ( Event Type : Responsability)

UCM Scenario's Responsability objects are mapped to ActionReference objects of a certain Action in TDL. Notes:
- To be compatible with the PlantUML visualisation tool (TBA), every ActionReference must have a name and a body who decribes it's name and decription, respectively. Those two attributes are implemented in TDL as AnnotationType named "STEP" and "PROCEDURE". Each ActionReference must then be generated with one Annotation of each of these two AnnotationType ( see example in Mapping Examples For Tdl Export)

Event ( Event Type : Timer_Set)

UCM Scenario's Timer_Set Events are mapped to TimerStart objects in TDL. A TimerStart must have a period that defines the duration of the timer from start to timeout. The period is transfered from Timer_set to TimerStart as a Metadata that must follow this convention:

Metadata name = "period"
Metadata value = "timeValue timeUnit" (e.g. 45 second)

Note: Accepted "timeUnit" values are : tick, nanosecond, microsecond, millisecond, second, minute and hour. A space character is mandatory between the timeValue and the timeUnit as it acts as a separator in the algorithm.

Event ( Event Type : Timer_Reset)

UCM Scenario's Timer_Reset Events are mapped to TimerStop objects in TDL.

Event ( Event Type : Timeout)

UCM Scenario's Timeout Events are mapped to Timeout objects in TDL.


UCM Scenario's Message objects are mapped to Interaction objects in TDL. For two ComponentInstance to interact together ( e.g. send Interaction to each other) there must be a unique Connection between two, which is created implicitly during the transformation. Furthermore, a GateInstance of a certain GateType is needed as attribute of each ComponentInstance at both ends of a Connection. Currently a default GateType is used for every GateInstance as the Message in UCM Scenarios are very abstract.


UCM Scenario's Parallel objects are mapped to ParallelBehaviour objects in TDL contained in the "main" Block. In the transformation algorithm, the Parallel objects are seen as Sequence and so they generate one children Block for each parallel Sequence .

-- Patrice Boulet - 27 May 2014

Topic revision: r4 - 07 Aug 2014 - 17:26:43 - Daniel Amyot
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback