childTransitionInstances.add(transitionInstance);
} else if (!isInactiveConcurrentRoot(execution) && !execution.getActivityInstanceId().equals(parentActInst.getId())) {
ActivityInstanceImpl activityInstance = childActivityInstances.get(execution.getActivityInstanceId());
if (activityInstance != null) {
// instance already created -> add executionId
String[] executionIds = activityInstance.getExecutionIds();
executionIds = Arrays.copyOf(executionIds, executionIds.length + 1);
executionIds[executionIds.length] = execution.getId();
activityInstance.setExecutionIds(executionIds);
} else {
// create new activity instance
ActivityInstanceImpl actInstance = new ActivityInstanceImpl();
initProcessElementInstance(actInstance, parentActInst, execution);
actInstance.setBusinessKey(execution.getBusinessKey());
actInstance.setExecutionIds(new String[]{execution.getId()});
ScopeImpl activity = getActivity(execution);
actInstance.setActivityId(activity.getId());
Object name = activity.getProperty("name");
if(name!=null) {
actInstance.setActivityName((String) name);
}
Object type = activity.getProperty("type");
if(type != null) {
actInstance.setActivityType((String) type);
}
childActivityInstances.put(actInstance.getId(), actInstance);
}
}
}