This is a feature that really ought to be characterized as an implementation feature rather than a semantic feature.
When first thinking about StateCharts we tend to think of a state as being associated with a chunk of code, and a transition as being associated with a chunk of code. But in fact it is better to think of states and transitions as having multiple code blocks: on-initialization, on-deinitialization, on-entry, on-exit, before-transition, during-transition, after-transition, etc.
Moreover we should think in terms of the boilerplate code that is emitted by the code generator as well as the user-entered code. By breaking things down in this way we can more readily create a flexible StateChart representation.
-- DaleBrayden - 16 Jul 2002