* @throws ModelException If the object model is flawed
*/
private static void updateState(final State s, final Map targets)
throws ModelException {
//initialize next / inital
Initial ini = s.getInitial();
Map c = s.getChildren();
List initialStates = null;
if (!c.isEmpty()) {
if (ini == null) {
logAndThrowModelError(ERR_STATE_NO_INIT,
new Object[] {getStateName(s)});
}
Transition initialTransition = ini.getTransition();
updateTransition(initialTransition, targets);
initialStates = initialTransition.getTargets();
// we have to allow for an indirect descendant initial (targets)
//check that initialState is a descendant of s
if (initialStates.size() == 0) {