Zurück zu Willert.de

Accept Event Action on state charts

Rhapsody Model or Codegeneration topics

Accept Event Action on state charts

Postby soewa » July 21st, 2010, 2:12 pm

Hi,

is it possible to wait for events using a "Accept Event Action" on a state chart.
It does not work for me with Rhapsody 7.5.1.

Thanks,
Soewa
soewa
 
Posts: 3
Joined: May 25th, 2010, 11:13 am

Re: Accept Event Action on state charts

Postby Skywalker » October 18th, 2010, 4:34 pm

Afaik, Rhapsody does support the graphical notation of an "Accept Event Action" on statechart diagrams in v7.5 and later (I've checked for v7.5.1). It would also allow to do that on activity diagrams (in both design and analysis mode).

However, Rhapsody also allows using the textual notation in order to show, that a transition waits for an event on a statechart.

The textual format allows to show the triggering event, an optional guard and an optional action (which could be a send action) associated with that transition.

The textual format looks like that:
Event [Guard] / Action

The nice thing about Rhapsody... it does not only show that on a diagram, it can also generate corresponding code (including an automatically generated event class definition on package level and an event reception on class level).

In system analysis mode, the graphical notation may be better understandable and so probably preferable (see on the left):

StatechartAcceptEvent.png
StatechartAcceptEvent.png (8.86 KiB) Viewed 6709 times

For target code / deployable code generation I'd recommend using the textual notation, because it generates more efficient code (avoiding implicit "sendaction" and "accepteventaction" helper states in the code - see on the right).

-Luke.
May the force be with you ...
Skywalker
 
Posts: 74
Joined: October 31st, 2007, 5:09 pm
Location: Milkyway, classic 9-planet solar system


Return to Modelling with Rhapsody

Who is online

Users browsing this forum: No registered users and 3 guests