private static void updateState(final State state, final Map<String, TransitionTarget> targets)
throws ModelException {
List<EnterableState> children = state.getChildren();
if (state.isComposite()) {
//initialize next / initial
Initial ini = state.getInitial();
if (ini == null) {
state.setFirst(children.get(0).getId());
ini = state.getInitial();
}
SimpleTransition initialTransition = ini.getTransition();
updateTransition(initialTransition, targets);
Set<TransitionTarget> 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) {