コード例 #1
0
ファイル: BpmnMapper.java プロジェクト: havid0707/effektif
 /** Work in progress for testing conditions. */
 public <T extends Condition> T readCondition(String xml, Class<T> conditionClass) {
   XmlElement xmlRoot = XmlReader.parseXml(new StringReader(xml));
   if (xmlRoot != null && xmlRoot.elements != null) {
     try {
       T condition = conditionClass.newInstance();
       BpmnReaderImpl reader = new BpmnReaderImpl(bpmnMappings, jsonStreamMapper);
       reader.currentXml = xmlRoot;
       condition.readBpmn(reader);
       return condition;
     } catch (Exception e) {
       throw new RuntimeException("Could not read condition: " + e.getMessage(), e);
     }
   } else {
     return null;
   }
 }
コード例 #2
0
ファイル: BpmnMapper.java プロジェクト: havid0707/effektif
 public AbstractWorkflow readFromReader(Reader reader) {
   XmlElement xmlRoot = XmlReader.parseXml(reader);
   return new BpmnReaderImpl(bpmnMappings, jsonStreamMapper).readDefinitions(xmlRoot);
 }