| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 流程节点进程图 |
| | | * |
| | | * @param processDefinitionId |
| | | * @param processInstanceId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> modelView(String processDefinitionId, String processInstanceId) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | // 节点标记 |
| | | if (StringUtil.isNotBlank(processInstanceId)) { |
| | | result.put("flow", this.historyFlowList(processInstanceId, null, null)); |
| | | HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery() |
| | | .processInstanceId(processInstanceId) |
| | | .singleResult(); |
| | | processDefinitionId = processInstance.getProcessDefinitionId(); |
| | | } |
| | | BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId); |
| | | // 流程图展示 |
| | | result.put("xml", new String(new BpmnXMLConverter().convertToXML(bpmnModel))); |
| | | return result; |
| | | } |
| | | } |