Book a Demo

Author Topic: CallEvent in UML state machines  (Read 11913 times)

deefer

  • EA User
  • **
  • Posts: 98
  • Karma: +0/-0
    • View Profile
CallEvent in UML state machines
« on: December 30, 2011, 01:51:53 am »
Hi everybody.

I have some doubts about the CallEvent in state machines.

Suppose that I'm modelling a class that contains a state machine.

The class has some defined operations , such as DoThis().

Now, the class has 2 states: Idle and Doing

I want to model the transition from Idle to Doing by specifying that, when the class receives the call DoThis, goes into the state Doing.

My first idea is to specify a transition, triggered by a CallEvent, with the name of the event to be the DoThis operation. Is it ok?

I'm puzzled because, in the EA help, it is stated that the CallEvent is actually sent by the class (which calls the operation of this or another class). This contradicts with what I've read in the UML specs 2.4.1, chapter 13.3.6), where it is stated that the call is received and not sent.

Pleas help me, thank you.
Davide

rocketman

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: CallEvent in UML state machines
« Reply #1 on: January 21, 2012, 06:09:38 am »
You're on the right track.  A call has a sender and receiver (like a phone call or snail mail).  In the context of state machine, using the Rx of call to trigger a transition is spot on.  Just create the transition from stateA to stateB and label the transition as the doThis() call.  

Doing so would imply that when some other object/class calls the doThis() operation, it triggers the class being defined from stateA to stateB.

For completeness, the call would need to be provided on an interface to some other class/object.