public static ProcessDefinition parseReaderSource(Reader reader) { JbpmContext jbpmContext = createPageflowContext(); try { return new PageflowParser(reader).readProcessDefinition(); } finally { jbpmContext.close(); } }
@Override public void readNodes(Element nodeCollectionElement, NodeCollection nodeCollection) { super.readNodes(nodeCollectionElement, nodeCollection); if ( "pageflow-definition".equals( nodeCollectionElement.getName() ) ) { String startPageName = nodeCollectionElement.attributeValue("start-page"); if (startPageName==null) { Element startPageElement = nodeCollectionElement.element("start-page"); if (startPageElement!=null) { startPageName = startPageElement.attributeValue("name"); } } if (startPageName!=null) { Node startPage = getProcessDefinition().getNode(startPageName); if (startPage!=null) { getProcessDefinition().setStartState(startPage); } } } }
public static ProcessDefinition parseInputSource(InputSource inputSource) { JbpmContext jbpmContext = createPageflowContext(); try { return new PageflowParser(inputSource).readProcessDefinition(); } finally { jbpmContext.close(); } }