Home » Modeling » UML2 » UML 2.x - Raising Events on Transition (State Machine / Effect)
UML 2.x - Raising Events on Transition (State Machine / Effect) [message #552489] |
Thu, 12 August 2010 11:28 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Hi @all,
I have a (for me) very important question about UML (2.x) state machines, and I am really despairing of the following topic for several weeks now. As my research topic is about visual DSLs (not that close to UML, but now I have to deal with its metamodel), I do not search for a practical solution, but a good discussion with people who have a good knowledge about the UML metamodel and tools supporting the generation of code out of UML state machine diagrams.
My question:
How can I create a transition within a UML state machine which fires a state transition within another UML state machine (note: of course by sending a message/event to another object/instance which has this state machine as "Classifier Behavior").
In scientific papers, some presentations, etc., I sometime find a notation like this
State A ----> State B
Transition: SomeTrigger [SomeGuard] /
^AnObject.AnotherTriggerEventEtc()
or
Transition: SomeTrigger [SomeGuard] / send
AnObject.AnotherTriggerEventEtc()
(a nice example can be found here on page 5:
http://www.pst.ifi.lmu.de/veroeffentlichungen/knapp-merz-rau h:2002.pdf )
However, this is not the only example I found.
Please correct me, if I am wrong, but this is not correct UML (at least 2.x), isn't it?
Now I need the same thing, and I think that many people need such "asynchronous signal mechanism" (just to name it). And because of my tools, my field of research, model transformations based on the UML metamodel, I need the way, how to do it "CORRECTLY" with UML 2.x.
Maybe someone knows the following Eclipse UML tools and knows how to model the "asynchronous signal mechanism":
Topcased
Papyrus
UML2Tools
(not Eclipse, but I also checked "Sparx Systems - Enterprise Architect"...)
As far as I know, all these tools (except EA) are generated (with some additional metainfo, of course) by using the UML metamodel resp. its EMF-based implementation, so the tools are able to produce correct UML models according to its spec.
In each editor I am able to set one "effect" for each "Transition", whereas "effect" is of type "Behavior".
"Behavior" - Hierarchy (excerpt):
"StateMachine" is a "Behavior"
"OpaqueBehavior" is a "Behavior"
"Activity" is a "Behavior"
"Interaction" is a "Behavior"
I digged into each direction... but I could not find a solution.
So... which way do I have to choose to "raise an event"?
Thanks a lot!
Regards,
Kirsten.
P.S.: A second question: maybe you know the "," notation, if multiple effects should be applied when a transition is fired. How to realize that? Obviously, only ONE effect can be set for each transition (see OMG Unified Modeling Language (OMG UML), Superstructure, V2.1.2, page 586, http://www.omg.org/spec/UML/2.1.2/Superstructure/PDF/ ).
[Updated on: Thu, 12 August 2010 14:33] Report message to a moderator
|
|
| | | | | | |
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #552961 is a reply to message #552489] |
Sun, 15 August 2010 07:53 |
Vlad Varnica Messages: 546 Registered: July 2009 Location: Milton Keynes - UK |
Senior Member |
|
|
It is always the same problem after the transformation stage. This is why I recommend live MOF live synchronization with the UML diagram. Today there are no live synchronization between GMF and EMF. You problem which is related to the state diagram is in reality related to a higher level framework architecture.
This is why my answer could seem strange but I give the truth in order to avoid you wasting your time.
@ Ed:
EMF framework is like mechanics. You can change a gas pipe but if you don't change the carburetor the problem will not be solved. Why to explain only how to change the pipe if you already know that the carburetor is not working ?
[Updated on: Sun, 15 August 2010 07:54] Report message to a moderator
|
|
| | | | |
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #554409 is a reply to message #552489] |
Sun, 22 August 2010 20:37 |
Erhard Weinell Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Dear Kirsten,
this is what I can tell from some studies of the UML2 metamodel,
referring to version 2.2 (which should not make much of a difference,
see the change notes).
Am 12.08.2010 13:28, schrieb vultur:
> My question:
> How can I create a transition within a UML state machine which fires a
> state transition within another UML state machine (note: of course by
> sending a message/event to another object/instance which has this state
> machine as "Classifier Behavior").
Use an Interaction (ext. Behavior) as the transition's effect. Each
Interaction takes a set of actions which, in your case, would best be a
SendSignalAction. This one fires a predefined Signal.
On the receipient side, a Trigger gets a ReceiveSignalEvent taking the
same Signal as above. Done.
> Maybe someone knows the following Eclipse UML tools and knows how to
> model the "asynchronous signal mechanism":
> Topcased
> Papyrus
> UML2Tools
> (not Eclipse, but I also checked "Sparx Systems - Enterprise Architect"...)
The Eclipse UML2 metamodel implementation supports this very well. I
don't know about the frontends, though. Is this critical for your work?
I thought it would be related to model transformations on the abstract
syntax.
> P.S.: A second question: maybe you know the "," notation, if multiple
> effects should be applied when a transition is fired. How do realize
> that? Obviously, only ONE effect can be set for each transition
An Interaction can take several Actions, but if you want to precisley
model sequences, parallelism and synchronisation between those actions,
I'd rather use an own StateMachine as behavior, describing each action
step by step using states & transitions.
BTW, there is a Xing group (http://www.xing.com/net/uml/) with people
happily discussing such topics. Maybe you can get response from there, too.
Best luck,
Erhard
--
Meet us online!
w http://www.yatta.de
tw @YattaSolutions
fb http://www.facebook.com/YattaSolutions
|
|
|
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #554410 is a reply to message #554266] |
Sun, 22 August 2010 20:55 |
Erhard Weinell Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Hello Kirsten,
Am 20.08.2010 22:25, schrieb vultur:
> I am very frustrated that many people avoid getting into this
> discussion. In my eyes, it is a flaw in UML that my question cannot be
> answered simply and decisivly.
OK, maybe this question is too fundamental (non-tool related?) for the
eclipse forum, there might be better places to ask first (e.g. the Xing
forum mentioned above).
> Here is some more (old) material which shows what I want to do:
> - http://www.sts.tu-harburg.de/teaching/ws-99.00/OOA+D/StateDi agrams.pdf
> (<<send>> notation)
This is definitely very vague and outdated (it's UML1 - UML2 didn't show
up before 2005). I'm not quite sure whether there was a standard way to
do this back in UML 1.[134].
> I simply have NO idea how these obvious concepts can be modeled using
> the current (and valid) UML meta-model.
I think the best way to approach such a task is to visualize a
sufficient fragment of the metamodel (as "profile diagram" or just as
class diagram, you name it), and navigate around to see endpoints that
might fit together. Here the obvious end-points of this navigation was
the transition and the signal. From there it is quite easy to see how
these are related over few steps. Not everything is directly obvious in
UML, but one can be quite certain that his needs have been anticipated
in the spec. :)
Best regards,
Erhard
--
Meet us online!
w http://www.yatta.de
tw @YattaSolutions
fb http://www.facebook.com/YattaSolutions
|
|
|
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #554664 is a reply to message #554410] |
Mon, 23 August 2010 23:10 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Dear Erhard,
thanks for your enlightening statements.
The most important information for me was: what I want to achieve really requires additional model elements, whereas "interactions" are recommended.
Your explanation perfectly makes sense. Of course, I tried this approach on my own, because I know all meta classes which are derived from Behavior (and can be used as effect, therefore).
However, I stopped my experiments (sequence diagrams have been the most promising ones) wondering if such complexity for such an easy task is really necessary. And worse: even with sequence diagrams, I am not able to describe unambiguous semantics.
The understanding problem I have:
Ok, I can note sender (L) and receiver (R) side via life lines there. I can describe that a message A is sent from L to R. I can name this action, so I can call it on a state chart transition (effect). The event message can trigger a transition on the other state chart as a consequence.
So far, so good. However, one detail is missing!
How can I describe how L and R are related?!? In my case, I have a class diagram describing that L knows one R in Role 'r' (a simple navigable association). This information is missing in sequence diagrams I know. Life lines can have a (classifier) type and an optional name (which has no additional semantics, excepts that it is an identifier). Where is the information that L sends the event not to an arbitrary R, but 'r'?
-----
Almost Offtopic (another paper I found):
http://www4.informatik.tu-muenchen.de/publ/papers/meisinge00 .pdf
I am really close to a heart attack, because after more than 15 of development, the UNIFIED modelling language still encourages people to such an uncontrolled growth of inventions for message passing, because basic UNIFIED features which can be used more easily are missing.
However, you are right, this should be discussed in a totally UML related community. I guess, they would not like my opinion
[Updated on: Mon, 23 August 2010 23:11] Report message to a moderator
|
|
| |
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #554908 is a reply to message #554712] |
Tue, 24 August 2010 16:44 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Vlad,
Comments below.
Vlad Varnica wrote:
> It is impossible to predict all possible modeling needs with only a
> graphical notation such as UML.
UML isn't only a graphical notation.
> However UML covers 90% of the need therefore if you use the graphical
> model you get 90% and the other 10% can only be covered by the use of
> the UML metamodel.
See, it's a complete model that can be graphically visualized.
> You can add sub elements, trace requirements and constrainst etc..
> on each UML metamodel element. This is only possible if the UML
> diagram is live synchronized with the UML metamodel because
> transformation at this stage is not possible from EMF serialization or
> GMF etc....
GMF provides a view of the underlying UML model. They are synchronized.
> My vision is that UML diagrams should be on the top of the UML model
> and not just be a part of the model displayed as a diagram.
Diagrams are a view of the model. Things like layout, position, are
graphical aspects for how the underlying UML instance is viewed. Is
this how you envision it or not?
> Omondo has left the traditional UML modeling market because we don't
> believe there any future in this none sense views and pieces of
> models, model transformation and code generation which then use
> transformation stage to create code and UML models.
You digress. This thread is about state machines. No mention of code
generation has occurred.
> What is incredibly complex because of intermediate layers is easy and
> possible with the UML metamodel !!
That's nice but is related to the state diagram questions how?
> If you don't understand what I say, no problem for me because if you
> are stuck in modeling complexity please note that our customers are not .
Why bother saying things no one understands? They're a guy downtown
with a big sign and he's about the end of the world. No one understand
him either.
> They even model very marge and complex models which are not
> recommended by traditional UML consultant lost in model transformation
> complexity while business modeling real needs are forgotten.
> This is why I have said good luck for your project because many of us
> knows that UML views of models are not the right solution.
This is all so convoluted. Modeling large complex models, UML views of
models verses just having live synchronized diagrams on top of the UML
model but that are not part of a model displayed as a diagram. It's hard
for us average people to make sense of all these English words strung
together haphazardly.
>
> Why should I behave like a sheep following either UML model
> transformation technologies or agile development without UML because
> we are fedup with UML ?
Sheep are good for wool.
> There is an intermediate stage with UML metamodeling which allows very
> complex modeling and fantastic code generation.
But you said "very marge and complex models are not recommended."
> What is even more fantastic is that code generation is traced from the
> model and live synchronized when needed and not all the time.
Unless it's needed all the time?
> @Ed - Feel free to leave your dirty comments
Well there you go.
> but my vision is that EMF is dead
Someone needs to let EMF know as soon as possible!
> and will be sooner or later be replaced by UML metamodeling when
> dealing with the UML technologies.
But wait, UML metamodeling is implemented by EMF. Is UML propped up by
the undead. That's just unnatural and most certainly wrong. Why
doesn't UML implement itself to eliminate this horrible EMF thing?
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #554944 is a reply to message #554712] |
Tue, 24 August 2010 20:42 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Hi Vlad,
I totally respect your opinion, and I am always glad to hear about other technologies. However, you never really included the topic of this thread. Thanks for you wishes to my "project", but I don't really have a project, and I am not realizing projects for a company. I am simply doing research und want to know facts about UML (in addition with Eclipse Tools and how solutions could practically be modeled there - non visually by the way!)
Ok, I also complain a little about UML, but this is only some critics in order to help improving techniques (ok... maybe too optimistic ). And I am also interested how other technologies realize message passing, e.g. within state charts, etc. If you cannot answer to my question concretely, your postings could help, if you show examples and other technologies which answer to my question. (However, as far as I am concerned, I have to stay with Eclipse, EMF and UML).
Three other things I want to mention:
I am not interested in code generation, implementation, visual notation and other industry relevant stuff... you keep telling me that, but this is not what I want.
What I want to model is nothing incredibly complex. I just have no idea how a simple message passing is modelled correctly / state-of-the-art in UML (and Eclipse tools).
I think that EMF and UML perfectly fit together! Both are not perfect, bug-free and will not be a standard forever. However, current possibilities, propagation, acceptance, ideas and some other aspects are outstanding.
Ok, please back to topic...
[Updated on: Tue, 24 August 2010 20:43] Report message to a moderator
|
|
| | | |
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628610 is a reply to message #554410] |
Mon, 23 August 2010 23:10 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
Dear Erhard,
thanks for your enlightening statements.
The most important information for me was: what I want to achieve really requires additional model elements, whereas "interactions" are recommended.
Your explanation perfectly make sense. Of course, I tried this approach on my own, because I know all meta classes which are derived from Behavior (and can be used as effect, therefore).
However, I stopped my experiments (sequence diagrams have been the most promising ones) wondering if such complexity for such an easy task is really necessary. And worse: even with sequence diagrams, I am not able to describe unambiguous semantics.
The understanding problem I have:
Ok, I can note sender (L) and receiver (R) side via life lines there. I can describe that a message A is sent from L to R. I can name this action, so I can call it on a state chart transition (effect). The event message can trigger a transition on the other state chart as a consequence.
So far, so good. However, one detail is missing!
How can I describe how L and R are related?!? In my case, I have a class diagram describing that L knows one R in Role 'r' (a simple navigable association). This information is missing in sequence diagrams I know. Life lines can have a (classifier) type and an optional name (which has no additional semantics, excepts that it is an identifier). Where is the information that L sends the event not to an arbitrary R, but 'r'?
-----
Almost Offtopic (another paper I found):
http://www4.informatik.tu-muenchen.de/publ/papers/meisinge00 .pdf
I am really close to a heart attack, because after more than 15 of development, the UNIFIED modelling language still encourages people to such an uncontrolled growth of inventions for message passing, because basic UNIFIED features which can be used more easily are missing.
However, you are right, this should be discussed in a totally UML related community. I guess, they would not like my opinion ;)
|
|
| |
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628616 is a reply to message #628611] |
Tue, 24 August 2010 16:44 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Vlad,
Comments below.
Vlad Varnica wrote:
> It is impossible to predict all possible modeling needs with only a
> graphical notation such as UML.
UML isn't only a graphical notation.
> However UML covers 90% of the need therefore if you use the graphical
> model you get 90% and the other 10% can only be covered by the use of
> the UML metamodel.
See, it's a complete model that can be graphically visualized.
> You can add sub elements, trace requirements and constrainst etc..
> on each UML metamodel element. This is only possible if the UML
> diagram is live synchronized with the UML metamodel because
> transformation at this stage is not possible from EMF serialization or
> GMF etc....
GMF provides a view of the underlying UML model. They are synchronized.
> My vision is that UML diagrams should be on the top of the UML model
> and not just be a part of the model displayed as a diagram.
Diagrams are a view of the model. Things like layout, position, are
graphical aspects for how the underlying UML instance is viewed. Is
this how you envision it or not?
> Omondo has left the traditional UML modeling market because we don't
> believe there any future in this none sense views and pieces of
> models, model transformation and code generation which then use
> transformation stage to create code and UML models.
You digress. This thread is about state machines. No mention of code
generation has occurred.
> What is incredibly complex because of intermediate layers is easy and
> possible with the UML metamodel !!
That's nice but is related to the state diagram questions how?
> If you don't understand what I say, no problem for me because if you
> are stuck in modeling complexity please note that our customers are not .
Why bother saying things no one understands? They're a guy downtown
with a big sign and he's about the end of the world. No one understand
him either.
> They even model very marge and complex models which are not
> recommended by traditional UML consultant lost in model transformation
> complexity while business modeling real needs are forgotten.
> This is why I have said good luck for your project because many of us
> knows that UML views of models are not the right solution.
This is all so convoluted. Modeling large complex models, UML views of
models verses just having live synchronized diagrams on top of the UML
model but that are not part of a model displayed as a diagram. It's hard
for us average people to make sense of all these English words strung
together haphazardly.
>
> Why should I behave like a sheep following either UML model
> transformation technologies or agile development without UML because
> we are fedup with UML ?
Sheep are good for wool.
> There is an intermediate stage with UML metamodeling which allows very
> complex modeling and fantastic code generation.
But you said "very marge and complex models are not recommended."
> What is even more fantastic is that code generation is traced from the
> model and live synchronized when needed and not all the time.
Unless it's needed all the time?
> @Ed - Feel free to leave your dirty comments
Well there you go.
> but my vision is that EMF is dead
Someone needs to let EMF know as soon as possible!
> and will be sooner or later be replaced by UML metamodeling when
> dealing with the UML technologies.
But wait, UML metamodeling is implemented by EMF. Is UML propped up by
the undead. That's just unnatural and most certainly wrong. Why
doesn't UML implement itself to eliminate this horrible EMF thing?
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628617 is a reply to message #628611] |
Tue, 24 August 2010 20:42 |
Kirsten M. Z. Messages: 132 Registered: July 2010 |
Senior Member |
|
|
I totally respect your opinion, and I am always glad to hear about other technologies. However, you never really included the topic of this thread. Thanks for you wishes to my "project", but I don't really have a project, and I am not realizing projects for a company. I am simply doing research und want to know facts about UML (in addition with Eclipse Tools and how solutions could practically be modeled there - non visually by the way!)
Ok, I also complain a little about UML, but this is only some critics in order to help improving techniques (ok... maybe too optimistic :d ). And I am also interested how other technologies realize message passing, e.g. within state charts, etc. If you cannot answer to my question concretely, your postings could help, if you show examples and other technologies which answer to my question. (However, as far as I am concerned, I have to stay with Eclipse, EMF and UML).
Three other things I want to mention:
I am not interested in code generation, implementation, visual notation and other industry relevant stuff... you keep telling me that, but this is not what I want.
What I want to model is nothing incredibly complex. I just have no idea how a simple message passing is modelled correctly / state-of-the-art in UML (and Eclipse tools).
I think that EMF and UML perfectly fit together! Both are not perfect, bug-free and will not be a standard forever. However, current possibilities, propagation, acceptance, ideas and some other aspects are outstanding.
Ok, please back to topic...
|
|
|
Goto Forum:
Current Time: Wed Apr 24 23:56:57 GMT 2024
Powered by FUDForum. Page generated in 0.05080 seconds
|