//we have to use getTargets() here since the initialState can be
//an indirect descendant
// Concern marked by one of the code reviewers: better type check,
// now ClassCastException happens for Parallel
// Response: initial should be a State, for Parallel, it is implicit
State initialState = (State) scxml.getTargets().get(initialstate);
if (initialState == null) {
// Where do we, where do we go?
logAndThrowModelError(ERR_SCXML_NO_INIT, new Object[] {
initialstate });
}