Book a Demo

Author Topic: How to copy the sequences well between .eap files  (Read 5542 times)

Takeshi_KOUNO

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
How to copy the sequences well between .eap files
« on: March 12, 2002, 01:05:02 am »
Hello all,

I use EA(build 470,Trial edition :'() and make sequence diagrams.I want to copy them to another .eap file, and I tried to use XML export/import.
But it didn't go well,only few messages were copied (actors and objects were copied correctly).I checked XML file and I found a lot of messages weren't exported (maybe bug?).

Please teach me if you have good way to copy sequence diagrams.

Thanks in advance.

gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: How to copy the sequences well between .eap fi
« Reply #1 on: March 12, 2002, 04:57:42 am »
Hi,

I just tested this by creating a sequence diagram in a package, adding objects, messages etc. and exporting to XMI. I started a new project and imported the XMI - the objects and messages were re-created fine.

The following rules apply though:

1. Objects and actors defined explicitly for a diagram will exist in the same package as the diagram - so they and any messages between them will export/import OK

2. If you create an object instance in a sequence diagram (eg. Joe:Customer) ... then if the base class is in the same package it will export/import OK. If not, the object when imported will not have a classifier - unless the base already exists in the target project. Note that classes are identified by their GUID or unique idenifier - so 'Customer' class in one model may not be the same class as 'Customer' in another model - it all depends on the GUID.

3. If you have a linked element in a sequence diagram (eg. a class or element from another package) and that element does not exist in the target model, then it will not appear in the sequence diagram when imported and any messages to it will be lost.

So in general ...

When you export and import between models, you need to be sure that all the required 'parts' are in both models- including classifiers, linked classes &etc.

If you still have problems, maybe you could send me a sample model to try. Send to [email protected]

Hope this helps,

Geoff Sparks



















Takeshi_KOUNO

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: How to copy the sequences well between .eap fi
« Reply #2 on: March 12, 2002, 07:44:40 pm »
Hello,

I read your rules and I checked my diagram.
And I found easy way to reappear my problem.

1.Create sequence diagram.
2.Put two packages into it.
3.Make a message from one packages to another.
4.Export the diagram.
5.Delete current diagram.
6.Import files created at 4.
7.You'll find message made in 3 disappear.

I'm afraid that above message is against rules of UML...



Mike Alletto

  • Guest
Re: How to copy the sequences well between .eap fi
« Reply #3 on: April 04, 2002, 06:25:42 am »
I see the exact same problems as described by Takeshi. The explanation provided seemed to miss the target. I have a system engineer that works at another site with a copy of our EA data base. He created a sequence diagram and exported it. When I imported the diagram the actors, objects, notes, and classes were there but the messages were not.

I then tried an experiment where I created a sequence diagram in a package by dragging in two objects from other packages. I put a message between them then exported the diagram. I deleted the diagram and then tried to import it back. It came in with both of the objects, but the message was gone. This seems to be the exact scenario that Takeshi described. Is there an explanation as to what we are doing wrong?

gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: How to copy the sequences well between .eap fi
« Reply #4 on: April 04, 2002, 03:41:36 pm »
Hi,

The problem arises because the XMI import/export is Package based. When you export, EA looks for all the elements that belong to the export package and writes them out. It also looks for all relationships to other elements in the current package and writes them out. It then looks for all relationships from an object in the current package to an element in an external package, and creates a stub object for the target - on the assumption it will be in the model somewhere when imported later.

In the case where both source and target are not in the current package - EA does not export the relationship - and it is therefore missing when the import occurs. If one element is in the current package, and one not, then the relationship will be captured and exported/imported. I can look further at this, but Im not sure what can be done.

In the meantime I would suggest ensuring at least one end of every message is in the current package export, and in general use object instances as sequence objects as these are always contained in the same package as the diagram.

Hope this clears things up, Ill make a note to look into a better solution for this,

Geoff Sparks