itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
174 stars 84 forks source link

Validate history states as default entries #2385

Closed tkutz closed 5 years ago

tkutz commented 5 years ago

We have a validation for regions without default (unnamed) entries. This works well for standard entries which always have an outgoing transition. However, when a history state is used as default entry (because it is unnamed) we need to validate that it either has an outgoing transition, or that the region can be entered directly by a hierarchy crossing transition.

This should be marked as invalid:

bildschirmfoto 2018-10-25 um 16 03 50

However, this is ok:

bildschirmfoto 2018-10-25 um 16 09 34

And this is of course also fine:

bildschirmfoto 2018-10-25 um 16 11 40

tkutz commented 5 years ago

Additionally, when a history state does not have an outgoing transition AND there is NO other default entry, we should give a warning because then we have to trust that the model is built in a way that the composite state is always entered somehow (by a hierarchy crossing transition) before the history state is entered.

tkutz commented 5 years ago

The first two cases will produce a warning now. See PR https://github.com/Yakindu/statecharts/pull/2419