Book a Demo

Author Topic: conversion EA Models to uml format  (Read 8410 times)

saurabh

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
conversion EA Models to uml format
« on: April 15, 2008, 07:25:10 pm »
Hello everyone,

I am working on EA tool and i have to convert my EA models to uml conform format. Could anyone please tell me how can i convert my EA Activity Diagrams to uml format ??

Please reply soon

Thanks in advance
Saurabh

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: conversion EA Models to uml format
« Reply #1 on: April 15, 2008, 09:37:05 pm »
Hmm, EA itself uses standard UML 2.1 notation by default.
However it depends on your skills to model it complying to standards.

I am not sure what your intention is here. Would you like to import diagrams from a different tool (Visio, etc.) then you need either the Visio import addin from the sparxsystems download or the model be present in XMI standard to be importable.

If you would like to export your model to a different (UML) tool then you will  have to export the model/packages to XMI.

However, as I am sure that I did not understand your intention the right way, a more detailed requirement description of your issue would be helpful.

Regards,

Oliver
« Last Edit: April 15, 2008, 09:37:49 pm by ofels »

saurabh

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: conversion EA Models to uml format
« Reply #2 on: April 16, 2008, 10:27:29 pm »
Hello Oliver,

Thanks for your reply.

To make the things more clearer to you. Please have a look at this now.

My main objective is to export the enterprise architect diagrams to
eclipse based applicton. The application reads the diagrams in .uml
format. I tried to change the extension of the xmi generated by EA
diagrams into .uml, but this xmi is different from the standard .uml
file. For more undertsanding, i am sending you the example .uml file
structure which i need my EA models to be converted in. Check that this file mentions each model element with _xmi:type="uml: element type"._


<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="idModel"
name="actModel">
<packagedElement xmi:type="uml:Package" xmi:id="idPackage"
name="actPackage">
<packagedElement xmi:type="uml:Activity" xmi:id="idActivity"
name="actActivity">
<node xmi:type="uml:InitialNode" xmi:id="_5gjTIPXGEdy1NpYnC6ZNAA"
name="InitialNode1" outgoing="_3_iBh_tGEdyjC9ORvMK87Q"/>
<node xmi:type="uml:ActivityFinalNode"
xmi:id="_Cl7jQvXHEdy1NpYnC6ZNAA" name="ActivityFinalNode1"
incoming="_eYnnF_XHEdy1NpYnC6ZNAA"/>
<node xmi:type="uml:StructuredActivityNode"
xmi:id="_b1lCkPXHEdy1NpYnC6ZNAA" name="StructuredActivityNode1"
outgoing="_eYnnF_XHEdy1NpYnC6ZNAA" incoming="_3_iBh_tGEdyjC9ORvMK87Q"/>
<node xmi:type="uml:InitialNode" xmi:id="_KLk_YPtAEdyjC9ORvMK87Q"
name="InitialNode2"/>
<edge xmi:type="uml:ControlFlow" xmi:id="_eYnnF_XHEdy1NpYnC6ZNAA"
name="ControlFlow2" source="_b1lCkPXHEdy1NpYnC6ZNAA"
target="_Cl7jQvXHEdy1NpYnC6ZNAA">
<guard xmi:type="uml:LiteralBoolean"
xmi:id="_eYnnGPXHEdy1NpYnC6ZNAA" value="true"/>
<weight xmi:type="uml:LiteralInteger"
xmi:id="_eYnnGfXHEdy1NpYnC6ZNAA" value="1"/>
</edge>
<edge xmi:type="uml:ControlFlow" xmi:id="_3_iBh_tGEdyjC9ORvMK87Q"
name="ControlFlow3" source="_5gjTIPXGEdy1NpYnC6ZNAA"
target="_b1lCkPXHEdy1NpYnC6ZNAA">
<guard xmi:type="uml:LiteralBoolean"
xmi:id="_3_iBiPtGEdyjC9ORvMK87Q" value="true"/>
<weight xmi:type="uml:LiteralInteger"
xmi:id="_3_iBiftGEdyjC9ORvMK87Q" value="1"/>
</edge>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype"
xmi:id="_49EWIPXHEdy1NpYnC6ZNAA" name="stereo"/>
<profileApplication xmi:id="_kDH2UPXIEdy1NpYnC6ZNAA">
<eAnnotations xmi:id="_kDkiQPXIEdy1NpYnC6ZNAA"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href="pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbnfB2L_5w"/>
</eAnnotations>
<appliedProfile
href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
</profileApplication>
</packagedElement>
</uml:Model>


Regards
Saurabh

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: conversion EA Models to uml format
« Reply #3 on: April 16, 2008, 11:07:38 pm »
Your problem is here:

Quote
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="idModel"
name="actModel">

Looks as if this version of xmi is based on a different namespace which is non standard xmi but a special one introduced by the Eclipse foundation.
Thefore the Eclipse app/plugin is unable to import the elements from EA due the missing namespace elements.
You could look up in the Eclipse community for the corresponding namespace description/xmi format.
Maybe someone has written a XSL stylesheet to convert the files from EA to Eclipse.
Unfortunately this is an area in which I have not moved much yet.

Good luck.

Oliver
« Last Edit: April 16, 2008, 11:08:37 pm by ofels »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: conversion EA Models to uml format
« Reply #4 on: April 17, 2008, 08:32:52 am »
Yes, ironically.  The file format .uml used by the Eclipse Modelling Framework does not actually use the UML metamodel, but Eclipse Modelling Framework.

EA doesn't support exporting XMI using this metamodel, however have a look at http://components4oaw.sourceforge.net/.

I think that it does.

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: conversion EA Models to uml format
« Reply #5 on: April 17, 2008, 05:49:27 pm »
Quote
http://components4oaw.sourceforge.net/.

I think that it does.

Ah, look, this is interesting, I did not know that OpenArchitectureware is affected by that.
Evaluating OAW is a pending task here as it seems we will be using it additionally for certain components in the future.
Thanks for pointing this out.

Oliver


saurabh

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: conversion EA Models to uml format
« Reply #6 on: April 17, 2008, 09:19:47 pm »
Hello Simon,

Thanks for your reply. I hope and it seems that this will work.

Could you please send me some more information on how to export diagrams through this as there is no documentation available for it ??

Also i could not find any examles on this which might give some insight on how to do it.

I have downloaded OAW, added the external jars, but dont know how to go further in it. Just a small piece of code would be fine.

Please reply soon.

With Regards,
Saurabh


Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: conversion EA Models to uml format
« Reply #7 on: April 17, 2008, 11:40:11 pm »
Saurabh,

Simon (and therefore SparxSystems) is not affiliated with OAW.

You will have to find your own way through the issue.
Maybe in the OAW forums there is more help to find.

Oliver

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: conversion EA Models to uml format
« Reply #8 on: April 18, 2008, 08:38:00 am »
Sorry, I haven't used it, it's just something that I remembered seeing when I saw this discussion.

Stephane W.

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: conversion EA Models to uml format
« Reply #9 on: April 22, 2008, 03:46:40 am »
Hello all !

I have quite the same problem here :
I need to transform an EA model to an ECore model (Eclipse EMF model).

I also tried to use UML2Exporter for oAW, but I can't get it working. In the developper's blog, it is written that the new eaapi.jar (EA 7.1, which is the version I use) doesn't work with UML2Exporter. I'm about to try using EA 7.0 trial version (if the jar is provided in the trial version...) tomorrow. I'll tell you if it works for me (I'm new to oAW)...

But without using oAW, everything works fine using XMI export (then UML import under eclipse) if I export the whole model without "full EA roundtrip" and without tagged values (I only tried with class models).
But there's still a problem concerning primitive types and java types in class attributes types :
If I use a primitive type or a java type ("int" for instance), this type is simply lost during XMI export.
The only way is to define "int", "Date", and all such types in the EA model (by defining corresponding classes).
For instance, I must define my own "Date" class, and make an attribute of this type when I need a date in a class...

Here is the result when I use an attribute with type "MyInteger" :
Code: [Select]
<packagedElement xmi:type="uml:Class" xmi:id="EAID_FA828349_0ED1_4e39_B0F9_B5B021440195" name="Class2" visibility="public">
      <ownedAttribute xmi:type="uml:Property" xmi:id="EAID_24AED5DC_959E_45da_9B9F_89FB2F8E4F24" name="einttest2" visibility="private" isDerived="false" isOrdered="false">
            <type xmi:idref="EAID_173CF02C_EC25_47c1_8862_529665130B13"/>
            <lowerValue xmi:type="uml:LiteralInteger" xmi:id="EAID_LI000003_959E_45da_9B9F_89FB2F8E4F24" value="1"/>
            <upperValue xmi:type="uml:LiteralInteger" xmi:id="EAID_LI000004_959E_45da_9B9F_89FB2F8E4F24" value="1"/>
      </ownedAttribute>
</packagedElement>
Where "EAID_173CF02C_EC25_47c1_8862_529665130B13" (in the "type" tag) refers to the "MyInteger" class defined elsewhere in the XMI file...

To integrate this into EMF, I would need to change the line :
Code: [Select]
<type xmi:idref="EAID_173CF02C_EC25_47c1_8862_529665130B13"/>To
Code: [Select]
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EInt"/>Which involves parsing and transforming the XMI (I don't know if a xsl stylesheet would be enough...)
But there may be another way than XMI transform to achieve this... Any clues ?

I'm wondering which one is the best : coding a XMI transform or manage to get UML2Exporter working...

Thanks in advance for your answers :)
(and excuse me for my poor english  :-[)

Stephane W.

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: conversion EA Models to uml format
« Reply #10 on: April 22, 2008, 09:14:05 pm »
I tried to use oAW with the old eaapi.jar, but I still get the same problem :
ERROR WorkflowRunner - Package [...] not found in model!
I tried using a lot of package paths, but no one works.
I know you already told that this forum is not an oAW forum, so I won't discuss this problem further.

Concerning the other method : changing the XMI export for attribute types.
Can you tell me a simple way to achieve this using EA, or give me some piece of advice ?
Maybe I should open a new thread to discuss this ?
Thanks in advance  :)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: conversion EA Models to uml format
« Reply #11 on: April 23, 2008, 08:32:08 am »
Build 729 of EA fixes the problems with the Java API, but I don't know anything of the other problems.