Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » How I can get the hierarchy of the events on a UML lifeline?
How I can get the hierarchy of the events on a UML lifeline? [message #1030971] Mon, 01 April 2013 02:35
Mohamed Mussa is currently offline Mohamed MussaFriend
Messages: 43
Registered: August 2010
Location: Canada
Member
Hi,

I am trying to compare the specification of two UML lifelines of the same object from different models.
I extracted the events covered by the UML Lifeline through the coveredBy feature. However, I can not figure the hierarchy among them from this feature.

To illustrate I draw a UML interaction in Figure1. The UML tree in given in Figure 2. Figure 3 shows the coveredBy property of lifeline1 as taken from the Property View, as you can seen, each feature is described down to the root of the model [model]. The code I used to extract the event and its output is below.


In particular, I can not distinguish which events belong to the combinedfragment (in this example Message4Send0/ Message4Recv0) and when the combinedfragment ends (inM!InteractionOperand0).


Yours,
Mohamed


do {
'----- Start of Code ----------'.println();
if (lclLifeLines.notEmpty()) {
for(tc in lclLifeLines) {
	tc.name.toString().debug('      [LifeLine]');
	for(ss in tc.coveredBy) {
	myStr <- ss.toString().concat('  ---  '.concat(ss.oclType().toString()));
	myStr.debug('         [coveredBy]');
	'      ----- End of LifeLine ----------'.println();
	}
}
}


----- Start of Code ----------
[LifeLine]: 'Lifeline1'
[coveredBy]: 'inM!Message1Send --- UML2!MessageOccurrenceSpecification'
[coveredBy]: 'inM!CombinedFragment --- UML2!CombinedFragment'
[coveredBy]: 'inM!InteractionOperand --- UML2!InteractionOperand'
[coveredBy]: 'inM!Message2Recv --- UML2!MessageOccurrenceSpecification'
[coveredBy]: 'inM!InteractionOperand0 --- UML2!InteractionOperand'
[coveredBy]: 'inM!Message3Recv --- UML2!MessageOccurrenceSpecification'
[coveredBy]: 'inM!Message4Send0 --- UML2!MessageOccurrenceSpecification'
----- End of LifeLine ----------
[LifeLine]: 'Lifeline2'
[coveredBy]: 'inM!Message1Recv --- UML2!MessageOccurrenceSpecification'
[coveredBy]: 'inM!CombinedFragment --- UML2!CombinedFragment'
[coveredBy]: 'inM!InteractionOperand --- UML2!InteractionOperand'
[coveredBy]: 'inM!Message2Send --- UML2!MessageOccurrenceSpecification'
[coveredBy]: 'inM!InteractionOperand0 --- UML2!InteractionOperand'
[coveredBy]: 'inM!Message3Send --- UML2!MessageOccurrenceSpecification'
[coveredBy]: 'inM!Message4Recv0 --- UML2!MessageOccurrenceSpecification'
----- End of LifeLine ----------

Figure 1: http://docs.google.com/file/d/0B6_h5x3CJuQNR2k2YWJJajFWUEk/edit?usp=sharing

Figure 2: http://docs.google.com/file/d/0B6_h5x3CJuQNRklWOE1sb3ZKRFE/edit?usp=sharing

Figure 3: https://docs.google.com/file/d/0B6_h5x3CJuQNdFlJNW1SWS16R2c/edit?usp=sharing

[Updated on: Tue, 02 April 2013 16:41]

Report message to a moderator

Previous Topic:I need to submit my project omorrow,but there are some errors!
Next Topic:how to call a java method in an atl code
Goto Forum:
  


Current Time: Sat Dec 20 03:07:15 GMT 2014

Powered by FUDForum. Page generated in 0.09668 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software