| | |
| | | import com.java110.intf.user.IOrgInnerServiceSMO; |
| | | import com.java110.po.oaWorkflow.OaWorkflowPo; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | |
| | | Model modelData = repositoryService.getModel(workflowModelDto.getModelId()); |
| | | byte[] bpmnBytes = null; |
| | | bpmnBytes = repositoryService.getModelEditorSource(workflowModelDto.getModelId()); |
| | | if(bpmnBytes == null || bpmnBytes.length< 1){ |
| | | throw new CmdException("未设置流程"); |
| | | } |
| | | String processName = modelData.getName() + ".bpmn20.xml"; |
| | | ByteArrayInputStream in = new ByteArrayInputStream(bpmnBytes); |
| | | Deployment deployment = repositoryService.createDeployment().name(oaWorkflowDtos.get(0).getFlowName()) |
| | |
| | | .createProcessDefinitionQuery() |
| | | .deploymentId(deploymentid) |
| | | .singleResult(); |
| | | |
| | | //更新部门流程关系表 |
| | | workflowModelDto.setDeploymentId(deploymentid); |
| | | |