Activiti 5.18 流程Model 转成 流程BPMN文件

直接上代码吧

        byte[] bpmnBytes = null;
String filename = null;
JsonNode editorNode = new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelId));
BpmnJsonConverter jsonConverter = new BpmnJsonConverter();
BpmnModel model = jsonConverter.convertToBpmnModel(editorNode);
filename = model.getMainProcess().getId() + ".bpmn20.xml";
bpmnBytes = new BpmnXMLConverter().convertToXML(model); ByteArrayInputStream in = new ByteArrayInputStream(bpmnBytes);

字节流in中包含着已经转成bpmn文件的字节,之后怎么输出就看系统需求了

上一篇:【DB】MYSQL相关细节


下一篇:HTML中的marquee标签实现滚动效果