Пример #1
0
  /** Work in progress for testing conditions. */
  public String writeToString(BpmnWritable model) {
    BpmnWriterImpl writer = new BpmnWriterImpl(bpmnMappings);
    writer.startElementBpmn("conditionsTest");
    model.writeBpmn(writer);

    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    XmlWriter xmlWriter = new XmlWriter(stream, "UTF-8");
    xmlWriter.writeDocument(writer.xml);
    xmlWriter.flush();
    return stream.toString();
  }
Пример #2
0
 public void writeToStream(AbstractWorkflow workflow, OutputStream out) {
   XmlElement bpmnDefinitions = new BpmnWriterImpl(bpmnMappings).writeDefinitions(workflow);
   XmlWriter xmlWriter = new XmlWriter(out, "UTF-8");
   xmlWriter.writeDocument(bpmnDefinitions);
   xmlWriter.flush();
 }