Home » Modeling » UML2 » UML 2.x - Raising Events on Transition (State Machine / Effect)
|UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628569]
||Thu, 12 August 2010 11:28
| Kirsten M. Z.
Registered: July 2010
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.
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] /
Transition: SomeTrigger [SomeGuard] / send
(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":
(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!
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 (see OMG Unified Modeling Language (OMG UML), Superstructure, V2.1.2, page 586, http://www.omg.org/spec/UML/2.1.2/Superstructure/PDF/ ).
|Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628608 is a reply to message #628569]
||Sun, 22 August 2010 20:37
| Erhard Weinell
Registered: July 2009
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":
> (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
> 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.
Meet us online!
|Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628609 is a reply to message #628607]
||Sun, 22 August 2010 20:55
| Erhard Weinell
Registered: July 2009
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..
> 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. :)
Meet us online!
Current Time: Tue Mar 03 12:55:47 GMT 2015
Powered by FUDForum
. Page generated in 0.03039 seconds