1 package org.jbpm.bpel.par; 2 3 import org.jbpm.bpel.def.BpelDefinition; 4 import org.jbpm.bpel.xml.BpelReader; 5 import org.jbpm.bpel.xml.ProblemCollector; 6 import org.jbpm.graph.def.ProcessDefinition; 7 import org.jbpm.jpdl.par.ProcessArchive; 8 import org.jbpm.jpdl.par.ProcessArchiveParser; 9 10 14 public class BpelArchiveParser implements ProcessArchiveParser { 15 16 17 public ProcessDefinition readFromArchive(ProcessArchive archive, ProcessDefinition definition) { 18 BpelReader reader = BpelReader.getInstance(); 20 BpelDefinition bpelDefinition = (BpelDefinition) definition; 21 ProblemCollector readerProblems = new ProblemCollector(bpelDefinition.getLocation()); 23 reader.setProblemHandler(readerProblems); 24 reader.read((BpelDefinition) definition, archive); 26 archive.getProblems().addAll(readerProblems.getProblems()); 28 return definition; 29 } 30 } 31 | Popular Tags |