| | |
| | | |
| | | @Service("startDispatcher") |
| | | public class StartDispatcher { |
| | | @Autowired |
| | | private IFlowClient flowClient; |
| | | |
| | | @Autowired |
| | | private RuntimeService runtimeService; |
| | | @Autowired |
| | |
| | | Map<String,Object> preAssignee = autoAssignUsersService.autoAssignUsers(startVO.getProducePlanId()); |
| | | Map<String, Object> vars = new HashMap<>(preAssignee); |
| | | |
| | | vars.put("machineCode",startVO.getMachineCode()); |
| | | vars.put("machineMode",startVO.getMachineMode()); |
| | | |
| | | vars.put("processNo",startVO.getProcessNo()); |
| | | vars.put("processName",startVO.getProcessName()); |
| | | vars.put("processEdition",startVO.getProcessEdition()); |
| | | |
| | | vars.put("craftEdition",startVO.getCraftEdition()); |
| | | vars.put("planStartTime",startVO.getPlanStartTime()); |
| | | |
| | | //vars.put("producePlanId",startVO.getCraftEdition()); |
| | | |
| | | |
| | | String businessKey = "0";//业务表key |
| | | |
| | | identityService.setAuthenticatedUserId(String.valueOf(AuthUtil.getUserId()));//设置流程发起人 |
| | | ProcessInstance pinst = runtimeService.startProcessInstanceByKey(PROCESS_KEY,businessKey,vars); |
| | | //R<BladeFlow> flowR = flowClient.startProcessInstanceByKey(PROCESS_KEY,businessKey,vars); |
| | | //R<BladeFlow> flowR = flowClient.startProcessInstanceById(PROCESS_KEY,businessKey,vars); |
| | | |
| | | int a=1; |
| | | a =2; |