public void updateReferences(Set<DomainObject> objects) 
	throws XMLParsingException {

		for (Activity act : this.activities) {
			act.updateObjectReferences(objects);
			if (act.hasUnresolvedReferences()) {
				throw new XMLParsingException("Could not resolve object references for activity" + act.getName()); 
			}
		}

//		Set<ProcessNode> nodesCopy = new HashSet<ProcessNode>(nodes);
		for (ProcessNode node : this.nodes) {
			if (node instanceof ActivityNode) {
				ActivityNode actNode = (ActivityNode) node;
				String actName = actNode.getActivityName();
				for (Activity act : activities) {
					if (act.getName().equals(actName)) {
						actNode.setActivity(act);
						break;
					}
				}
			}
		}
		
		for (XMLProcessEdge edge : edges) {
			edge.updateReferences(nodes, objects);	
		}
	}