Question

I have experience with StarUML and Jumli. At my current company we have a Professional license for EA 9.2. When I design a program, I start with creating Use Cases. Then from every Use Case, I create a Sequence Diagram. And from the Sequence Diagrams, almost every Lifeline-object will become a class (and all messages will become a method). With StarUML and Jumli this wasn't a problem.

But I cannot find a way in EA to convert the Lifeline objects into classes.

My project

I tried to read the help from Sparx, but to me it is not really helpful. Their 'tutorial' is not a tutorial, but actually just another help file with lots of blah blah.

Can anyone tell me how to do this? Or are there any really helpful links?

Était-ce utile?

La solution

It IS possible, but only in one a bit hidden way. First I'll tell you about the alternative ways:

  • you have a conceptual error here. Timelines in Sequence diagram are not classes, but objects. So, they can't become classes.
  • Of course, a tool could have a function to create a class according to an object, as VP UML has. Obviously, EA has not such feature.
  • On the contrary, it is not a problem to drop a class on the sequence diagram to become a timeline. But EA has some conceptual problems with it, too. You have to make it an object here. Look also this.
  • On the other hand, there should be no problems to drop a timeline to the object diagram, but in EA it IS a problem - the object-timeline remains the timeline even on the Object diagram. That is obviously non-convenient and ununderstandable, but it is so. Obviously, it is one of these bugs that are called "features".
  • The same is behaviour of the timeline if we drop it on the Class Diagram. We even can't connect this object to a class by generalization - EA considers such connection as a rules breaking one.

And finally, how you CAN connect the timeline/object to a class. Right-click the timeline on the sequence diagram or its copy object on the class diagram. Go to Advanced. Choose Instance Classifier - the first menu item. There you can choose an existent class or even create a new one. And the object/timeline will belong to this very class.

You can't reach this feature from the Project Browser. It is obviously, another "feature" of the EA.

Autres conseils

In a spec-adherent UML tool, one can assign classes (among other things) to a lifeline. I think that is why you are having difficulty converting lifelines into classes: they aren't the same kind of thing! Try creating classes first and assigning them to lifelines.

To transform sequence model into class model right-click on the package choose "Transform Current Package" => Check DDL => Select Transform I hope this helps. Regards, Nabil

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top