/** * parse a process definition from an xml string. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlString(String xml) { StringReader stringReader = new StringReader(xml); JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(stringReader)); return jpdlReader.readProcessDefinition(); }
/** * parse a process definition from an xml input stream. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlInputStream(InputStream inputStream) { JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(inputStream)); return jpdlReader.readProcessDefinition(); }
/** * parse a process definition from an xml reader. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlReader(Reader reader) { JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(reader)); return jpdlReader.readProcessDefinition(); }
/** * parse a process definition from an xml string. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlString(String xml) { StringReader stringReader = new StringReader(xml); JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(stringReader)); return jpdlReader.readProcessDefinition(); }
/** * parse a process definition from an xml input stream. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlInputStream(InputStream inputStream) { JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(inputStream)); return jpdlReader.readProcessDefinition(); }
/** * parse a process definition from an xml reader. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlReader(Reader reader) { JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(reader)); return jpdlReader.readProcessDefinition(); }
/** * parse a process definition from an xml resource file. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlResource(String xmlResource) { URL resourceURL = ClassLoaderUtil.getClassLoader().getResource(xmlResource); if (resourceURL == null) { throw new JpdlException("resource not found: " + xmlResource); } JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(resourceURL.toString())); return jpdlReader.readProcessDefinition(); }
/** * parse a process definition from an xml resource file. * * @throws org.jbpm.jpdl.JpdlException if parsing reported an error. */ public static ProcessDefinition parseXmlResource(String xmlResource) { URL resourceURL = ClassLoaderUtil.getClassLoader().getResource(xmlResource); if (resourceURL == null) { throw new JpdlException("resource not found: " + xmlResource); } JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(resourceURL.toString())); return jpdlReader.readProcessDefinition(); }
public ProcessDefinition readFromArchive(ProcessArchive processArchive, ProcessDefinition processDefinition) throws JpdlException { // getting the value byte[] processBytes = processArchive.getEntry("processdefinition.xml"); if (processBytes == null) { throw new JpdlException("no processdefinition.xml inside process archive"); } ByteArrayInputStream processStream = new ByteArrayInputStream(processBytes); JpdlXmlReader jpdlXmlReader = new JpdlXmlReader(new InputSource(processStream), processArchive); return jpdlXmlReader.readProcessDefinition(); } }
public ProcessDefinition readFromArchive(ProcessArchive processArchive, ProcessDefinition processDefinition) throws JpdlException { // getting the value byte[] processBytes = processArchive.getEntry("processdefinition.xml"); if (processBytes == null) { throw new JpdlException("no processdefinition.xml inside process archive"); } ByteArrayInputStream processStream = new ByteArrayInputStream(processBytes); JpdlXmlReader jpdlXmlReader = new JpdlXmlReader(new InputSource(processStream), processArchive); return jpdlXmlReader.readProcessDefinition(); } }