Question & Answer
Question
Why are events in Rational Rhapsody modelled in a statechart at a default transition ignored in generated code?
Cause
The default transition is passed without waiting for an event. In the generated code the event does not exist - the default transition generated without any trigger.
In the example picture the event ev1 is ignored at both transitions, the action /a++ is executed.
Answer
According to statechart and simulation definitions you must always be able to reach the first basic state when entering a statechart or sub-state. That's why a trigger at a default transition must not exist.
But according to UML specification triggers at default transitions are allowed.
To resolve this conflict you can draw triggers for modeling purpose only. They are not generated in code and cannot be executed.
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
ibm10791471