I have a question about statechart diagrams below;
I suppose that, in UML, it is possible. In this case, execution order is S1 enter, S3 enter. Am I right? And In the next diagram, what is execution order when occured transiton from "any other state" to s1?
For the first diagram :
execution order is S1 enter, S3 enter. Am I right?
yes you are right, from the standard formal/2017-12-05 § 14.2.3.4.5 Entering a State page 310 :
Explicit entry: If the incoming Transition or its continuations terminate on a directly contained substate of the composite State, then that substate becomes active and its entry Behavior is executed after the execution of the entry Behavior of the containing composite State.
For the second diagram :
it seems to use an entryPoint pseudostate (badly drawn), but the transition from any other state is not going to it but to S1, so to the initial pseudostate, the execution is entryActS1 then entryActS2.
if it is not an entry point but a local transition from the border that changes nothing from any other state and the execution is also entryActS1 then entryActS2.
About the transition indicated internal
the transition from the possible entryPoint pseudostate or from the border is indicated internal, but internal transitions are self transitions where the source and target are the same state, as said in the standard formal/2017-12-05 §14.2.3.8.1 Transition kinds relative to source page 314 :
kind = internal is a special case of a local Transition that is a self-transition (i.e., with the same source and target States), such that the State is never exited (and, thus, not re-entered), which means that no exit or entry Behaviors are executed when this Transition is executed. This kind of Transition can only be defined if the source Vertex is a State.
So the second diagram is illegal :
state_is_local
A Transition with kind local must have a composite State or an entry point as its source.