activiti7 獲取流程定義的xml
- 2020 年 7 月 29 日
- 筆記
RepositoryService repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService();
//獲取BpmnModel對象
BpmnModel bpmnModel = repositoryService.getBpmnModel(processInstanceId);
//創建轉換對象
BpmnXMLConverter converter = new BpmnXMLConverter();
//把bpmnModel對象轉換成字元
byte[] bytes = converter.convertToXML(bpmnModel);
String xmlContenxt = new String(bytes);
xmlContenxt即為流程的xml