activiti7 獲取流程定義的xml

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
相關文章
相關標籤/搜索