Book a Demo

Author Topic: Building sequence diagrams from XMI code  (Read 3475 times)

andrea.baruzzo

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Building sequence diagrams from XMI code
« on: January 23, 2008, 09:18:57 am »
Hi,
I am building a tool which takes in input a UML model exported in XML with EA 7.0 (XMI 2.1) and works on a simplified internal representation of the model. I have some troubles reconstructing sequence diagrams. More in particular, I cannot find any useful interpretation of the coordinates SX,SY,CX,CY,EX,EY,OX, and OY which appear in the XML code for each connector (message arrow).
Below I report a short fragment of the generated XML code for a message called delta(). In bold I highlight the parts which interest me more.

[...]
<properties name="delta" ea_type="Sequence" direction="Source -> Destination" />
 <documentation />
 [...]
 <extendedProperties stateflags="Activation=0;ExtendActivationUp=0;" virtualInheritance="0" diagram="EAID_9AE18DF2_041A_4250_8C34_06E93771854D" privatedata1="Synchronous" privatedata2="retval=void;" privatedata3="Call" privatedata4="0" privatedata5="SX=0;SY=0;EX=0;EY=0;$LLB=;LLT=;LMT=CX=31:CY=14:OX=40:OY=15:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;LMB=;LRT=;LRB=;IRHS=;ILHS=;" />
[...]

Thus, I am looking for documentation or any information about this element.

Can someone of you help me?
Thank you in advance.

Andrea

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Building sequence diagrams from XMI code
« Reply #1 on: January 23, 2008, 10:12:01 am »
Andrea,

These, or at least some of them, relate to the positioning and geometry of the sequence as rendered on the diagram (versus the semantics of the sequence itself). CX and CY are seen in other DiagramObjects, though (I think) they have subtly different meanings. I suspect that the others relate to the origin and other aspects of the lifeline.

Try tweaking these values in the original schema - you can open it with your repository DBMS or Access; be careful to save it in the same format in the latter case - and see what effect this has. At the same time, tinker with the diagram a bit and compare the resulting XMI.

David
No, you can't have it!

andrea.baruzzo

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Building sequence diagrams from XMI code
« Reply #2 on: January 24, 2008, 03:04:51 am »
Hi David,
thank you for your suggestions. I have tried to tweak the values schema, working both at the diagram level and at the XMI code level, but the meaning of these coordinates remains rather obscure to me. I guess that they are related to the geometry (e.g. lifeline position, displacement, sequence order, and so on), but apart from these considerations, I am not being able to grasp more specific knowledge.

For example, in a simple diagram with four messages (alfa, beta, gamma, and delta) involving three lifelines (X,Y, and Z), Sx and Sy are always 0, whereas Cy is 14 for all messages. The only coordinate that varies is Cx (25, 28, 31, 43, respectively).

Furthermore, moving the last message at the top of the diagram (creating the sequence order delta-alfa-beta-gamma) does not affect in any way the coordinates of the other messages. Even reversing the order does not affect the numbers. The same situation happens if I move a little bit (or even more) the lifelines. In that case, however, the geometry coordinates associated to each lifeline changes accordigly. But again there are no clues about the messages.

In conclusion, I don't know how EA is able to load correclty the diagram from the XMI code when I import it (every time I reload a modified diagram using the export-import feastures, it reflects the changes I have performed in the editor, even if the XMI code remains unaffected, concerning the connectors values Sx,Sy,Cx,Cy...).

Thanks in any case for your patience. If you have any other suggestions or hints, please let me know.

Andrea.