Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
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 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 #628571 is a reply to message #628569] Fri, 13 August 2010 09:33 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
A solution would be to have live diagram, EMF and metamodel synchronization without the use of GMF. This is still Eclipse and EMF code on the top of which an advanced live synchronization mechanism has been added.

This EclipseUML Omondo technology is not today open source. if you can afford to buy a license then you will be able to do what you describing in your email.
If you can't afford to buy a license then feel free to develop your own code and donate it to the community.
The open source projects needs contributors and not just free users trying to reduce software expenses !!
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628574 is a reply to message #628571] Fri, 13 August 2010 15:47 Go to previous messageGo to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
Messages: 132
Registered: July 2010
Senior Member
maybe the answer to the wrong message?!?
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628587 is a reply to message #628569] Sat, 14 August 2010 17:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Vultur

> 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/ ).

I'm afraid that I can't answer your questions, but I note that you refer
to 2.1.2. UML has been through quite a lot of revisions because there
are a significant number of interested/critical parties. I suggest that
you look at the latest 2.3 specification. Unfortunately you may then
need to raise a Bugzilla because MDT/UML2 has not tracked the features
you need.

Regards

Ed Willink
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628588 is a reply to message #628569] Sun, 15 August 2010 07:53 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
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 ?
Time is important and if we know that will not work why not to tell the truth immediately ? v
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628589 is a reply to message #628588] Sun, 15 August 2010 09:54 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Vlad

Not sure which Ed you address, but like the other Ed, I too am totally
unable to understand how your comments address the original query.

Regards

Ed Willink


On 15/08/2010 08:53, Vlad Varnica wrote:
> 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 ?
> Time is important and if we know that will not work why not to tell the
> truth immediately ? v
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628590 is a reply to message #628588] Sun, 15 August 2010 16:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Vlad,

Comments below.

Vlad Varnica wrote:
> 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.
He's asking specific questions about UML's state machines. How that
relates to live synchronization is beyond everyone's understanding.
>
> This is why my answer could seem strange but I give the truth in order
> to avoid you wasting your time.
We've pretty much come to expect strange answers.
>
> @ 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.
This is the UML newsgroup. The question is about UML's state machines.
It's a question that applies regardless of whether UML is implemented
with EMF. Perhaps you should get down from your EMF soapbox. It's so
high up, the air is rarefied and making you light headed.
> Why to explain only how to change the pipe if you already know that
> the carburetor is not working ?
Your analogy in this context---a question about the capabilities of
state machines---escapes me.
> Time is important and if we know that will not work why not to tell
> the truth immediately ? v
What exactly will not work in this context? He can't get the state
machines linked in the way he wants?

Please don't use the Eclipse newsgroups as your own personal soapbox.
If you want to help answer questions, that's great. If you want to
point out cool features in Omondo that are relevant, that's not exactly
the point of these forums, but fine. However, these random digressions
of yours totally inappropriate. Please try to restrain yourself.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628591 is a reply to message #628569] Sun, 15 August 2010 20:52 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Good luck for your projects.
Re: UML 2.x - Raising Events on Transition (State Machine / Effect) [message #628607 is a reply to message #628569] Fri, 20 August 2010 20:25 Go to previous messageGo to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
Messages: 132
Registered: July 2010
Senior Member
Ok, after this disappointing start of this topic, I want to update my (UML related) question. I really hold it near and dear, and I cannot find a solution (after many weeks of research work). BTW: I put my question into this forum, because I think that the implemented (Ecore) UML meta-model is 99% valid and I want to use Eclipse tools in order to create a correct model.

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.

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)
- http://www.ait.unl.edu/siau/mgmt456/Booch-chpt21.ppt (just some text that states that raising events is possible)

Is all this meterial incorrect (even the paper in the beginning)?

I simply have NO idea how these obvious concepts can be modeled using the current (and valid) UML meta-model.

Regards,
Kirsten
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 Go to previous messageGo to next message
Erhard Weinell is currently offline Erhard WeinellFriend
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 #628609 is a reply to message #628607] Sun, 22 August 2010 20:55 Go to previous message
Erhard Weinell is currently offline Erhard WeinellFriend
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
Previous Topic:Retrieving applied stereotypes
Next Topic:EMF and the OMG Model Interchange Working Group
Goto Forum:
  


Current Time: Fri Apr 19 21:52:57 GMT 2024

Powered by FUDForum. Page generated in 0.03679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top