Author Topic: Concurrent States  (Read 4557 times)

Gruffy

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Concurrent States
« on: October 14, 2009, 05:56:05 pm »
Hi there!

I am currently working on generating code from state machines (and other stuff...). It works pretty well so far...but I have now stumbled upon a problem in the internal meta model of EA.

We are generating quite complex machines, including composite states etc. We are also generating concurrent states but it seems that there is no way to extract information for a composite state (that has partitions to do concurrent states) for which partition a substate belongs to.

I searched the forum here and saw some post about this suggesting that one should try and extract the info from the diagrams by doing some checks if a state is actually "drawn inside" a partition, i.e. using the coords of the partions as well as the states.

This solution is however not very nice, we are not looking into the diagrams at all while generating code and would like to keep it like that (as there for example could be several diagrams one must parse to get all details for an element). We have instead added a tagged value to each sub-state to indicate which partition it belongs to...but this is not a good solution either. We have to implement stuff to check if you have missed to set this tagged value etc. A lot of trouble modeling is also added, you must add "tags" to what is normally obvious in the diagram.

Now, I wonder if anyone of you have managed to solve this in a nice way...or even better, if there are any plans to implement this in the meta model in future releases. (Personally I think that it really should be in the meta model and not only "derived" from diagrams.)

Best regards
Gruffy

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +564/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Concurrent States
« Reply #1 on: October 14, 2009, 06:14:04 pm »
Gruffy,

You have a point. As I and others have already argued several times int his forum: Diagrams should not own model information.
Partitions and states are real model elements and their relation should be defined in the model, not in the diagrams.

The test for me should be that we ought to be able to delete every diagram from the model and not loose an single piece of model information.

Please send a formal bug report to Sparx to address this issue.
If enough of us keep coming back on this Sparx might one day fix the diagram != model issue.

Geert

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Concurrent States
« Reply #2 on: October 14, 2009, 10:40:11 pm »
I've sent a bug report a year or so ago and nothing came of it. Don't use concurrent state regions either cause I don't want to depend on diagrams for model information.

For a while my workaround was to define a state stereotype "region" and treat substates with this stereotype like concurrent state regions, but this is not nice either.

I've no idea why they don't seem to bother with implementing a decent state machine model. It's still UML 1 with some decorations to make it look like UML 2.