public void notify(DelegateTask delegateTask) { String processInstanceId = delegateTask.getProcessInstanceId(); ProcessInstance processInstance = runtimeService .createProcessInstanceQuery() .processInstanceId(processInstanceId) .singleResult(); Leave leave = new Leave(processInstance.getBusinessKey()); leave.setLeaveType((String) delegateTask.getVariable("leaveType")); leave.setStartTime((Date) delegateTask.getVariable("startTime")); leave.setEndTime((Date) delegateTask.getVariable("endTime")); leave.setReason((String) delegateTask.getVariable("reason")); leave.preUpdate(); leaveDao.update(leave); }
public void contractHandle(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_CONTRACT_HANDLE); String account = (String) delegateTask.getVariable("operatorAcc"); delegateTask.setAssignee(account); }
public void salesmanAudit(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_SALESMAN_AUDIT); String account = (String) delegateTask.getVariable("saleAcc"); delegateTask.setAssignee(account); }
public void bidding(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_BIDDING); String account = (String) delegateTask.getVariable("operatorAcc"); delegateTask.setAssignee(account); }
public String getDescription(DelegateTask delegateTask) throws Exception { String id = (String) delegateTask.getVariable("id"); SrOutsource srOutsource = new SrOutsource(); srOutsource.setId(id); srOutsource = (SrOutsource) getSrOutsourceService().list(srOutsource).get(0); return "[" + srOutsource.getProjName() + "] " + srOutsource.getName() + " "; }
public void professionalManagerAssess(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_PROFESSIONAL_MANAGER_ASSESS); String account = (String) delegateTask.getVariable("creatorAcc"); delegateTask.setAssignee(account); }
public void settlement(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_SETTLEMENT); String account = (String) delegateTask.getVariable("operatorAcc"); delegateTask.setAssignee(account); }
public void inspect(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_INSPECT); String account = (String) delegateTask.getVariable("qcAcc"); delegateTask.setAssignee(account); }
public void manufacture(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_MANUFACTURE); String account = (String) delegateTask.getVariable("operatorAcc"); delegateTask.setAssignee(account); }
public void projectManagerApprove(DelegateTask delegateTask) throws Exception { setTaskInfo(delegateTask, SrOsStatus.STATUS_PROJECT_MANAGER_APPROVE); SrProjectManager srProjectMgr = new SrProjectManager(); String projNo = (String) delegateTask.getVariable("projNo"); srProjectMgr.setProjNo(projNo); List<SrProjectManager> list = getSrProjectManagerService().list(srProjectMgr); if (list == null || list.size() == 0) { throw new Exception("未找到此工程的总管,请联系修船事业部相关人员,在“工程结算-基础数据-修船总管”中定义"); } delegateTask.addCandidateUsers(getSrProjectManagers(list)); }
@Override public void notify(DelegateTask delegateTask) { // get starter user name String initiator = (String) delegateTask.getVariable(Const.VAR_INITIATOR); delegateTask.addCandidateUser(initiator); }