private ProcessNode buildProcessNode(String nodeName, String nodeId,
			Attributes attr) {
		ProcessNode n = null;
		if ("begin".equalsIgnoreCase(nodeName)) {
			n = new BeginNode(nodeId);
		} else if ("end".equalsIgnoreCase(nodeName)) {
			n = new EndNode(nodeId);
		} else if ("processNode".equalsIgnoreCase(nodeName)) {
			n = new ProcessNode(nodeId);
		} else if ("multipleNode".equalsIgnoreCase(nodeName)) {
			n = new MultipleNode(nodeId);
		} else if ("multipleStepNode".equalsIgnoreCase(nodeName)) {
			n = new MultipleStepNode(nodeId);

		} else if ("fork".equalsIgnoreCase(nodeName)) {
			n = new ForkNode(nodeId);
		} else if ("join".equalsIgnoreCase(nodeName)) {
			n = new JoinNode(nodeId);
			((JoinNode) n).setWaitInvoker(attr.getValue("waitInvoker"));

		}else if("determine".equalsIgnoreCase(nodeName)){
			n = new DetermineNode(nodeId);
		}
		else
			throw new RuntimeException("unkown processNode name:" + nodeName);

		return n;

	}