use of org.activiti.engine.impl.util.io.StreamSource in project Activiti by Activiti.
the class ImportExportTest method exportAndReadXMLFile.
protected BpmnModel exportAndReadXMLFile(BpmnModel bpmnModel) throws Exception {
byte[] xml = new BpmnXMLConverter().convertToXML(bpmnModel, processEngineConfiguration.getXmlEncoding());
StreamSource xmlSource = new InputStreamSource(new ByteArrayInputStream(xml));
BpmnModel parsedModel = new BpmnXMLConverter().convertToBpmnModel(xmlSource, false, false, processEngineConfiguration.getXmlEncoding());
return parsedModel;
}
use of org.activiti.engine.impl.util.io.StreamSource in project Activiti by Activiti.
the class ImportExportTest method readXMLFile.
protected BpmnModel readXMLFile() throws Exception {
InputStream xmlStream = this.getClass().getClassLoader().getResourceAsStream(getResource());
StreamSource xmlSource = new InputStreamSource(xmlStream);
BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xmlSource, false, false, processEngineConfiguration.getXmlEncoding());
return bpmnModel;
}
use of org.activiti.engine.impl.util.io.StreamSource in project Activiti by Activiti.
the class CallActivityTest method loadBPMNModel.
protected BpmnModel loadBPMNModel(String bpmnModelFilePath) throws Exception {
InputStream xmlStream = this.getClass().getClassLoader().getResourceAsStream(bpmnModelFilePath);
StreamSource xmlSource = new InputStreamSource(xmlStream);
BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xmlSource, false, false, processEngineConfiguration.getXmlEncoding());
return bpmnModel;
}
use of org.activiti.engine.impl.util.io.StreamSource in project Activiti by Activiti.
the class ChineseConverterTest method exportAndReadXMLFile.
protected BpmnModel exportAndReadXMLFile(BpmnModel bpmnModel) throws Exception {
byte[] xml = new BpmnXMLConverter().convertToXML(bpmnModel, processEngineConfiguration.getXmlEncoding());
StreamSource xmlSource = new InputStreamSource(new ByteArrayInputStream(xml));
BpmnModel parsedModel = new BpmnXMLConverter().convertToBpmnModel(xmlSource, false, false, processEngineConfiguration.getXmlEncoding());
return parsedModel;
}
use of org.activiti.engine.impl.util.io.StreamSource in project Activiti by Activiti.
the class ChineseConverterTest method readXMLFile.
protected BpmnModel readXMLFile() throws Exception {
InputStream xmlStream = this.getClass().getClassLoader().getResourceAsStream(getResource());
StreamSource xmlSource = new InputStreamSource(xmlStream);
BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xmlSource, false, false, processEngineConfiguration.getXmlEncoding());
return bpmnModel;
}
Aggregations