package com.vci.server.workflow; import java.io.IOException; import java.util.Date; import java.util.List; import org.omg.CORBA.LongHolder; import com.vci.common.ServiceNames; import com.vci.corba.common.VCIError; import com.vci.corba.workflow.data.QueryParamInfo; import com.vci.corba.common.data.UserEntityInfo; import com.vci.corba.workflow.data.EventInfo; import com.vci.corba.workflow.data.FlowApproveContentInfo; import com.vci.corba.workflow.data.FlowApproveHistoryInfo; import com.vci.corba.workflow.data.FlowInstanceInfo; import com.vci.corba.workflow.data.FlowObjectInfo; import com.vci.corba.workflow.data.FlowTaskInfo; import com.vci.corba.workflow.data.MapTransfersInfo; import com.vci.corba.workflow.data.NodeHideInfo; import com.vci.corba.workflow.data.PlwfinstancetemplateInfo; import com.vci.corba.workflow.data.PlwfpersonsetInfo; import com.vci.corba.workflow.data.ProcessCategoryInfo; import com.vci.corba.workflow.data.ProcessDefinitionInfo; import com.vci.corba.workflow.data.ProcessTaskInfo; import com.vci.corba.workflow.data.SubprocessTemInfo; import com.vci.corba.workflow.data.TaskCCInfo; import com.vci.corba.workflow.data.TaskDescInfo; import com.vci.corba.workflow.data.TaskRevokeInfo; import com.vci.corba.workflow.data.TasksAssignedInfo; import com.vci.corba.workflow.WorkflowService; import com.vci.server.BaseService; import com.vci.server.workflow.common.resouce.EventProperties; import com.vci.server.workflow.common.resouce.WorkflowProperties; //import com.vci.server.workflow.server.WorkFlowCahe; import com.vci.server.workflow.server.delegate.FlowApproveContentDelegate; import com.vci.server.workflow.server.delegate.FlowInstanceDelegate; import com.vci.server.workflow.server.delegate.PlwfDelegate; import com.vci.server.workflow.server.delegate.ProcessCustomDelegate; import com.vci.server.workflow.server.delegate.TaskCCDelegate; import com.vci.server.workflow.server.taskEventEdit.EventEditDelegate; import com.zeroc.Ice.Current; public class WorkflowServiceImpl extends BaseService implements WorkflowService { public WorkflowServiceImpl() { // // 初始化Hibernate // HibernateSessionFactory.getSession(); // HibernateSessionFactory.closeSession(); // if (WorkFlowCahe.getTemplateMap() != null && WorkFlowCahe.getTemplateMap().size() == 0) { // ProcessCategoryInfo[] processCategories; // try { // processCategories = this.getProcessCategories("root", null); // for (ProcessCategoryInfo pc : processCategories) { // String id = pc.id; // ProcessDefinitionInfo[] processDefinitions = this.getProcessDefinitions(id, null); // for (ProcessDefinitionInfo pf : processDefinitions) { // String jbpmDeploymentId = pf.jbpmDeploymentId; // this.loadWorkFlowTemplate(jbpmDeploymentId, null); // } // } // } catch (VCIError e) { // e.printStackTrace(); // } // } } @Override public String getServiceName() { return ServiceNames.WFSERVICE; } @Override public void test(com.zeroc.Ice.Current current) { String op = current.operation; String adapter = current.adapter.getName(); String id = current.id.name; String time = new Date().toString(); System.out.println(String.format("== %s [WorkflowService.test] (adapter=%s, id=%s, op=%s)", time, adapter, id, op)); } @Override public ProcessCategoryInfo[] getProcessCategories(String parentId, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessCategories(parentId); } @Override public String saveProcessCategory(ProcessCategoryInfo info, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).saveProcessCategory(info); } @Override public boolean updateProcessCategory(ProcessCategoryInfo info, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).updateProcessCategory(info); } public boolean deleteProcessCategory(String id, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).deleteProcessCategory(id); } public boolean existProcessCategory(String id, String name, Current current) throws VCIError { return new ProcessCustomDelegate().existProcessCategory(id, name); } public boolean deployProcess(byte[] jbpmImage, String jbmpXml, String graphXml, String processCategoryId, ProcessTaskInfo[] processTaskInfos, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).deployProcess(jbpmImage, jbmpXml, graphXml, processCategoryId, processTaskInfos); } public boolean updateProcess(byte[] jbpmImage, String jbmpXml, String graphXml, String processCategoryId, ProcessTaskInfo[] processTaskInfos, UserEntityInfo userEnt, String deployId, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).updateProcess(jbpmImage, jbmpXml, graphXml, processCategoryId, processTaskInfos, deployId); } public boolean deleteProcessDefinition(String deployId, String pdId, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).deleteProcessDefinition(deployId, pdId); } public ProcessDefinitionInfo getProcessDefinitionByDeployId(String deployId, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinitionByDeployId(deployId); } public ProcessDefinitionInfo[] getProcessDefinitions(String processCategoryId, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinitions(processCategoryId); } public byte[] getProcessResource(String jbpmDeploymentId, String resourceType, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessResource(jbpmDeploymentId, resourceType); } public String[] getNextCandidates(String jbpmDeploymentId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getNextCandidates(jbpmDeploymentId, taskName, outcome); } public String[] getNextTaskNames(String jbpmDeploymentId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getNextTaskNames(jbpmDeploymentId, taskName, outcome); } public ProcessDefinitionInfo[] getProcessDefinition(String rmTemplateId, String processType, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinition(rmTemplateId, processType); } public void saveRMTemplateProcess(String rmTemplateId, String[] processTypes, String[] jbpmDeploymentIds, UserEntityInfo userEnt, Current current) throws VCIError { new ProcessCustomDelegate(userEnt).saveRMTemplateProcess(rmTemplateId, processTypes, jbpmDeploymentIds); } public boolean deleteRMTemplateProcess(String rmTemplateId, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).deleteRMTemplateProcess(rmTemplateId); } public boolean startProcessInstanceByKey(String processDefinitionKey, FlowInstanceInfo var, String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).startProcessInstanceByKey(processDefinitionKey, var, objId, userName, outcome); } // public long queryTraceTaskCount(String pluseroid, UserEntityInfo userEnt, String expandSql, Current current) throws VCIError { // return new ProcessCustomDelegate(userEnt).queryTraceTaskCount(pluseroid, expandSql); // } @Override public long queryTraceTaskCount(String pluser, String expandSql, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).queryTraceTaskCount(pluser, expandSql); } @Override public long queryMyTraceProcessCount(String pluseroid, UserEntityInfo userEnt, String expandSql, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).queryMyTraceProcessCount(pluseroid, expandSql); } public boolean completeTask(String taskId, String outcome, String nextTask, String approvalNote, UserEntityInfo userEnt, String[] userName, Current current) throws VCIError { // if(nextTask==null||"".equals(nextTask)){ // new ProcessCustomDelegate(userEnt).completeTask(taskId, // outcome, approvalNote, userName); // return true; // }else{ return new ProcessCustomDelegate(userEnt).completeTask(taskId, outcome, nextTask, approvalNote, userName); // } } public boolean completeTaskByPlatform(String taskId, String outcome, String nextTask, String approvalNote, UserEntityInfo userEnt, String[] userName, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).completeTaskByPlatform(taskId, outcome, nextTask, approvalNote, userName); } public ProcessTaskInfo findTaskPropertyById(String jbpmDeploymentId, String name, Current current) throws VCIError { return new ProcessCustomDelegate().findTaskPropertyById(jbpmDeploymentId, name); } public FlowApproveHistoryInfo[] getHistoryActivityByProInsId(String processInstanceId, Current current) throws VCIError { return new ProcessCustomDelegate().getHistoryActivityByProInsId(processInstanceId); } public byte[] getExecutionImageByExecutionId(String executionId, String taskName, Current current) throws VCIError { try { return new ProcessCustomDelegate().getExecutionImageByExecutionId(executionId, taskName); } catch (IOException e) { e.printStackTrace(); } return null; } public FlowObjectInfo[] getFlowObjectByExecutionId(String executionId, Current current) throws VCIError { return new ProcessCustomDelegate().getFlowObjectByExecutionId(executionId); } public String getDeploymentIdByExecutionId(String executionId, Current current) throws VCIError { return new ProcessCustomDelegate().getDeploymentIdByExecutionId(executionId); } public FlowInstanceInfo[] getFlowInstances(String applicant, Current current) throws VCIError { return new FlowInstanceDelegate().getFlowInstances(applicant); } public String saveFlowInstance(FlowInstanceInfo info, UserEntityInfo userEnt, Current current) throws VCIError { return new FlowInstanceDelegate(userEnt).saveFlowInstance(info); } public void endProcessInstance(String processInstanceId, UserEntityInfo userEnt, Current current) throws VCIError { new ProcessCustomDelegate(userEnt).endProcessInstance(processInstanceId); } public void endProcessInstanceByplatform(String processInstanceId, UserEntityInfo userEnt, Current current) throws VCIError { new ProcessCustomDelegate(userEnt).endProcessInstanceByplatform(processInstanceId); } public FlowInstanceInfo getFlowInstanceInfo(String executionId, Current current) throws VCIError { return new ProcessCustomDelegate().getFlowInstanceInfo(executionId); } public ProcessDefinitionInfo[] getProcessDefinitionByType(String processType, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinitionByType(processType); } public String getDepolymentID(String executionId, Current current) throws VCIError { return new ProcessCustomDelegate().getDepolymentID(executionId); } public byte[] getFlowImageByDeployID(String deployID, Current current) throws VCIError { try { return new ProcessCustomDelegate().getFlowImageByDeployID(deployID); } catch (IOException e) { e.printStackTrace(); } return null; } /* * 获取任务下阶段名称 * * @see * com.vci.rmip.workflow.corba.method.WorkflowServiceOperations#getTaskPhaseName * (java.lang.String, java.lang.String) */ public String getTaskPhaseName(String processDefinitionKey, String jbpmdeploymentid, FlowInstanceInfo var, UserEntityInfo userEnt, Current current) throws VCIError { String taskPhaseName = new ProcessCustomDelegate(userEnt).getTaskPhaseName(processDefinitionKey, jbpmdeploymentid, var); return taskPhaseName; } /* * 判断key重复 * * @see com.vci.rmip.workflow.corba.method.WorkflowServiceOperations#checkKey * (java.lang.String, java.lang.String) */ public boolean checkKey(String name, String keyValue, Current current) throws VCIError { return new ProcessCustomDelegate().checkKey(name, keyValue); } public String[] getDeployId(String taskId, Current current) throws VCIError { return new ProcessCustomDelegate().getDeployId(taskId); } public boolean getProcessTaskByTaskName(String taskId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessTaskByTaskName(taskId, taskName, outcome); } public TaskDescInfo[] getTaskDescList(String deploymentId, String taskName, Current current) throws VCIError { return new ProcessCustomDelegate().getTaskDescList(taskName, deploymentId); } public String[] getTrainName(String jbpmDeploymentId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getTrainName(jbpmDeploymentId, taskName, outcome); } public FlowTaskInfo[] getTodoTaskByUser(String pluseroid, long first, long pageSize, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getTodoTaskByUser(pluseroid, (int)first, (int)pageSize); } public String[] getNextTask(String executionId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getNextTask(executionId, taskName, outcome); } public String[] getUserNames(String executionId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getUserNames(executionId, taskName, outcome); } // 获取全部任务列表 public String[] getAllTaskNames(String jbpmDeploymentId, Current current) throws VCIError { return new ProcessCustomDelegate().getAllTaskNames(jbpmDeploymentId); } // 获取全部流程定义 public ProcessDefinitionInfo[] getProcessDefinitionAll(Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinitionAll(); } public String[] getAllOutComes(String taskID, Current current) throws VCIError { return new ProcessCustomDelegate().getAllOutComes(taskID); } public FlowTaskInfo[] getMyTrackProcessByUserId(String pluseroid, long first, long pageSize, UserEntityInfo userEnt, String expandSql, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getMyTrackProcessByUserId(pluseroid, (int)first, (int)pageSize, expandSql); } public byte[] getExecutionImage(String executionId, Current current) throws VCIError { try { return new ProcessCustomDelegate().getExecutionImage(executionId); } catch (IOException e) { e.printStackTrace(); } return null; } public String getUrlPath(String jbpmDeploymentId, String taskName, Current current) throws VCIError { return new ProcessCustomDelegate().getUrlPath(jbpmDeploymentId, taskName); } public boolean assignTask(String executionId, String username, Current current) throws VCIError { return new ProcessCustomDelegate().assignTask(executionId, username); } public boolean assignTaskByPlatform(String executionId, String username, Current current) throws VCIError { return new ProcessCustomDelegate().assignTaskByPlatform(executionId, username); } public boolean saveTaskCCInfo(TaskCCInfo[] infoList, Current current) throws VCIError { return new TaskCCDelegate().saveTaskCCInfo(infoList); } public TaskCCInfo[] getTaskCCInfos(String jbpmDeploymentId, Current current) throws VCIError { return new TaskCCDelegate().getTaskCCInfos(jbpmDeploymentId); } public boolean deleteTaskCC(String jbpmDeploymentId, String userName, Current current) throws VCIError { return new TaskCCDelegate().deleteTaskCC(jbpmDeploymentId, userName); } public long queryCCTaskCount(String pluser, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().queryCCTaskCount(pluser); } public FlowTaskInfo[] getCCTaskByUserId(String pluseroid, long first, long pageSize, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().getCCTaskByUserId(pluseroid, (int)first, (int)pageSize); } public boolean saveOrUpdateTasksAssigned(TasksAssignedInfo tasksAssignedInfo, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).saveOrUpdateTasksAssigned(tasksAssignedInfo); } public TasksAssignedInfo getTasksAssignedByUserName(String userName, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getTasksAssignedByUserName(userName); } public TasksAssignedInfo[] getAllTasksAssignedByUserName(String userName, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getAllTasksAssignedByUserName(userName); } public void creatTxtFile(Current current) throws VCIError { EventEditDelegate ee = new EventEditDelegate(); try { ee.creatTxtFile(); } catch (IOException e) { e.printStackTrace(); } } public String readTxtFile(Current current) throws VCIError { return new EventEditDelegate().readTxtFile(); } public void writeTxtFile(EventInfo[] eventInfoList, Current current) throws VCIError { try { new EventEditDelegate().writeTxtFile(eventInfoList); } catch (IOException e) { e.printStackTrace(); } } public void replaceTxtByStr(String oldStr, String replaceStr, Current current) throws VCIError { new EventEditDelegate().replaceTxtByStr(oldStr, replaceStr); } public void saveSubProcess(SubprocessTemInfo[] subprocessTemInfos, Current current) { new ProcessCustomDelegate().saveSubProcess(subprocessTemInfos); } // add by caill start 2016.4.8 public String getEventPropertyValue(String strKey, Current current) throws VCIError { // return new EventConfServerDelegate().getStringProperty(strKey); return EventProperties.getStringProperty(strKey); } // add by caill end public long checkSubprocessQuote(String subProcess, Current current) { return new ProcessCustomDelegate().checkSubprocessQuote(subProcess); } /** * 配置任务和用户 * * @see com.vci.rmip.workflow.corba.method.WorkflowServiceOperations#configTaskAndUser(java.lang.String, * java.lang.String[], java.lang.String[], java.lang.String[][]) */ public void configTaskAndUser(String deploymentId, String[] dataIds, String[] tasknames, String[][] userNames, Current current) { new ProcessCustomDelegate().configTaskAndUser(deploymentId, dataIds, tasknames, userNames); } public String getDeployIdByProcessDefintionId(String processDifId, Current current) { return new ProcessCustomDelegate().getDeployIdByProcessDefintionId(processDifId); } public boolean getEndNode(String jbpmDeploymentId, String endTaskName, Current current) { return new ProcessCustomDelegate().getEndNode(jbpmDeploymentId, endTaskName); } public String startPocessSetUser(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).startPocessSetUser(processDefinitionKey, flowInstanceInfo, objId, userEnt, userName, outcome, tasknames, taskUserNames); } public String[] nextTaskCandidateUsers(String excutionId, String taskName, Current current) throws VCIError { return new ProcessCustomDelegate().nextTaskCandidateUsers(excutionId, taskName); } public String getNextTaskAssigner(String executionId, String taskName, Current current) { return new ProcessCustomDelegate().getNextTaskAssigner(executionId, taskName); } public String getNextSubTaskAssigner(String executionId, String taskName, String outcome, Current current) { try { return new ProcessCustomDelegate().getNextSubTaskAssigner(executionId, taskName, outcome); } catch (Exception e) { e.printStackTrace(); } return ""; } public ProcessCategoryInfo[] getProcessCategoriesByPage(String parentId, long pageSize, long pageIndex, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessCategoriesByPage(parentId, (int)pageSize, (int)pageIndex); } public ProcessDefinitionInfo[] getProcessDefinitionsForRMCode(String processCategoryId, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinitionsForRMCode(processCategoryId); } public ProcessDefinitionInfo[] getProcessDefinitionsByPage(String processCategoryId, String name, long pageSize, long pageIndex, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinitionsByPage(processCategoryId, name, (int)pageSize, (int)pageIndex); } public ProcessDefinitionInfo[] getProcessDefinitionByProcessDefinitionName(String processCategoryName, String processCategoryId, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessDefinitionByProcessDefinitionName(processCategoryName, processCategoryId); } public long queryTodoTaskCount(String pluser, String taskType, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().queryTodoTaskCount(pluser, taskType); } public FlowTaskInfo[] getTodoTaskByUserId(String pluseroid, long first, long pageSize, String taskType, String sql, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getTodoTaskByUserId(pluseroid, (int)first, (int)pageSize, taskType, sql); } // public long queryTraceTaskCount(String pluser, String expandSql, UserEntityInfo userEnt, Current current) throws VCIError { // return new ProcessCustomDelegate(userEnt).queryTraceTaskCount(pluser, expandSql); // } public FlowTaskInfo[] getTrackTaskByUserId(String pluseroid, long first, long pageSize, String taskType, String querySQL, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getTrackTaskByUserId(pluseroid, (int)first, (int)pageSize, taskType, querySQL); } public FlowTaskInfo[] getDoneTaskByUserId(String pluseroid, long first, long pagesize, String taskType, String querySQL, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getDoneTaskByUserId(pluseroid, (int)first, (int)pagesize, taskType, querySQL); } public long queryDoneTaskCount(String pluser, String expandSql, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).queryDoneTaskCount(pluser, expandSql); } public void completeTaskforRMCode(String taskId, String outcome, String approvalNote, String[] userName, UserEntityInfo userEnt, Current current) throws VCIError { new ProcessCustomDelegate(userEnt).completeTask(taskId, outcome, approvalNote, userName); } public ProcessTaskInfo findTaskPropertyByProcessId(String jbpmDeploymentId, Current current) throws VCIError { return new ProcessCustomDelegate().findTaskPropertyByProcessId(jbpmDeploymentId); } public String getNextCandidatesDefineString(String jbpmDeploymentId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getNextCandidatesDefineString(jbpmDeploymentId, taskName, outcome); } public FlowTaskInfo[] getProcessControlByUserId(String pluseroid, long first, long pagesize, String taskType, String querySQL, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessControlByUserId(pluseroid, (int)first, (int)pagesize, taskType, querySQL); } public long queryProcessControlCount(String pluser, String taskType, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().queryProcessControlCount(pluser, taskType); } public FlowTaskInfo[] getDoneProcessByUserId(String pluseroid, long first, long pagesize, String taskType, String querySQL, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getDoneProcessByUserId(pluseroid, (int)first, (int)pagesize, taskType, querySQL); } public long queryDoneProcessCount(String pluser, String taskType, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).queryDoneProcessCount(pluser, taskType); } public ProcessTaskInfo getFirstProcessTask(String jbpmDeploymentId, Current current) throws VCIError { return new ProcessCustomDelegate().getFirstProcessTask(jbpmDeploymentId); } public ProcessTaskInfo getFirstProcessTaskByExecId(String execId, Current current) throws VCIError { return new ProcessCustomDelegate().getFirstProcessTaskByExecId(execId); } public String getAllNoAgreeProcessTaskByTaskName(String taskId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getAllNoAgreeProcessTaskByTaskName(taskId, taskName, outcome); } public boolean setNodeHide(String deploymentId, Current current) throws VCIError { return new ProcessCustomDelegate().setNodeHide(deploymentId); } public NodeHideInfo[] getNodeHideDeploymentId(Current current) throws VCIError { return new ProcessCustomDelegate().getNodeHideDeploymentId(); } public boolean deleteHideFlow(String deployId, Current current) throws VCIError { return new ProcessCustomDelegate().deleteHideFlow(deployId); } public FlowTaskInfo[] getTaskByCondition(String[] values, long first, long pagesize, String objectId, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getTaskByCondition(values, (int)first, (int)pagesize, objectId); } public long queryFlowTaskCount(String[] values, String objectId, boolean flag, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).queryFlowTaskCount(values, objectId, flag); } public String getNextTaskNameByJbpmId(String jbpmDeploymentId, String taskname, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getNextTaskNameByJbpmId(jbpmDeploymentId, taskname, outcome); } public String getNextTaskTypeByJbpmId(String jbpmDeploymentId, String taskname, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getNextTaskTypeByJbpmId(jbpmDeploymentId, taskname, outcome); } public String getProcessStartUser(String execId, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessStartUser(execId); } public String getProcessTaskId(String execId, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessTaskId(execId); } public boolean setPocessHide(String jbpmdeplotmentId, short status, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().setProcessHide(jbpmdeplotmentId, status); } public TaskRevokeInfo[] getTaskRevokeList(String deploymentId, String taskName, Current current) throws VCIError { return new ProcessCustomDelegate().getTaskRevokeList(taskName, deploymentId); } public boolean deleteTasksAssignedByUserName(String[] userName, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).deleteTasksAssignedByUserName(userName); } public boolean deleteTasksAssignedByIds(String[] ids, UserEntityInfo userEnt, Current current) throws VCIError { // System.out.println("===============WorkflowServiceImpl.deleteTasksAssignedByIds==============="); return new ProcessCustomDelegate(userEnt).deleteTasksAssignedByIds(ids); } public void setParticipation(String nextTaskId, String[] userNames, Current current) throws VCIError { new ProcessCustomDelegate().setParticipation(nextTaskId, userNames); } public String[] getAllUserListForTask(String taskName, String deploymentId, String outcome, String[] varkey, String[] varValue, Current current) throws VCIError { return new ProcessCustomDelegate().getAllUserListForTask(taskName, deploymentId, outcome, varkey, varValue); } public boolean saveFlowApproveContent(FlowApproveContentInfo info, UserEntityInfo userEnt, Current current) throws VCIError { return new FlowApproveContentDelegate(userEnt).saveFlowApproveContent(info); } public boolean updateFlowApproveContent(FlowApproveContentInfo info, UserEntityInfo userEnt, Current current) throws VCIError { return new FlowApproveContentDelegate(userEnt).updateFlowApproveContent(info); } public boolean deleteFlowApproveContent(String[] ids, UserEntityInfo userEnt, Current current) throws VCIError { return new FlowApproveContentDelegate(userEnt).deleteFlowApproveContent(ids); } public FlowApproveContentInfo[] getFlowApproveContents(UserEntityInfo userEnt, Current current) throws VCIError { return new FlowApproveContentDelegate(userEnt).getFlowApproveContents(); } public GetFlowApproveContentByPageingResult getFlowApproveContentByPageing(QueryParamInfo queryParamInfo, UserEntityInfo userEnt, Current current) throws VCIError { LongHolder total = new LongHolder(); total.value = 0; FlowApproveContentInfo[] facis = new FlowApproveContentDelegate(userEnt).getFlowApproveContentByPageing(total, queryParamInfo); return new GetFlowApproveContentByPageingResult(facis, total.value); } public FlowApproveContentInfo getFlowApproveContentById(String id, UserEntityInfo userEnt, Current current) throws VCIError { return new FlowApproveContentDelegate(userEnt).getFlowApproveContentById(id); } public boolean revokeTask(String taskName, String destActivityName, String executionId, Current current) throws VCIError { return new ProcessCustomDelegate().revokeTask(taskName, destActivityName, executionId); } public boolean appointTask(String destActivityName, String tagActivityName, String[] classNames, String executionId, String[] userNames, Current current) throws VCIError { return new ProcessCustomDelegate().appointTask(destActivityName, tagActivityName, classNames, executionId, userNames); } public String getProcessVariable(String executionId, String varName, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().getProcessVariable(executionId, varName); } public String[] getTasksNameByProcessName(String[] processNames, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getTasksNameByProcessName(processNames); } public String searchComplateTask(String[] param, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate().searchComplateTask(param); } public GetTasksAssignedByPageingResult getTasksAssignedByPageing(QueryParamInfo queryParamInfo, UserEntityInfo userEnt, Current current) throws VCIError { LongHolder total = new LongHolder(); TasksAssignedInfo[] tais = new ProcessCustomDelegate().getTasksAssignedByPageing(total, queryParamInfo); return new GetTasksAssignedByPageingResult(tais, total.value); } public boolean transmitTask(String taskId, String toUsername, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).transmitTask(taskId, toUsername, userEnt); } public boolean transmitTaskByPlatform(String[] taskIds, String toUsername, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).transmitTaskByPlatform(taskIds, toUsername, userEnt); } public FlowTaskInfo[] getFlowTaskInfoByDataId(String dataId, String tableName, Current current) throws VCIError { return new ProcessCustomDelegate().getFlowTaskInfoByDataId(dataId, tableName); } public String getTaskId(String currActivityName, String executionId, Current current) throws VCIError { return new ProcessCustomDelegate().getTaskId(currActivityName, executionId); } public String[] getOutComesByTaskName(String jbpmDeploymentId, String taskName, Current current) throws VCIError { return new ProcessCustomDelegate().getOutComesByTaskName(jbpmDeploymentId, taskName); } public boolean moveDefinition(String deploymentId, String categoryId, Current current) throws VCIError { return new ProcessCustomDelegate().moveDefinition(deploymentId, categoryId); } public void loadWorkFlowTemplate(String jbpmDeploymentId, Current current) throws VCIError { new ProcessCustomDelegate().loadWorkFlowTemplate(jbpmDeploymentId); } /* * 此处做了特殊处理,针对返回一个分类下的所有工作流模板的第一个任务的执行者列表,返回的字符串格式为: pdi.jbpmDeploymentId + "==" * + temps[j]; */ public String[] getCurCandidates(String jbpmDeploymentId, String taskName, String outcome, String excutionId, Current current) throws VCIError { if (taskName.equals("") && outcome.equals("")) return new ProcessCustomDelegate().getFirstTasksAssigneeByCatid(jbpmDeploymentId); else return new ProcessCustomDelegate().getCurCandidates(jbpmDeploymentId, taskName, outcome, excutionId); } public String[] getAllCandidatesForTask(String jbpmDeploymentId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getAllCandidatesForTask(jbpmDeploymentId, taskName, outcome); } public String[] getCurConstituents(String jbpmDeploymentId, String taskName, String outcome, Current current) throws VCIError { return new ProcessCustomDelegate().getCurConstituents(jbpmDeploymentId, taskName, outcome); } // public boolean startProcessInstanceByKeyForWuyuan( // String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, // String[] objId, UserEntityInfo userEnt, String[] userName, // String outcome) throws VCIError { // return new // ProcessCustomDelegate(userEnt).startProcessInstanceByKeyForWuyuan(processDefinitionKey, // flowInstanceInfo, objId,userName,outcome); // } public String[] getsubTasks(String taskId, Current current) { return new ProcessCustomDelegate().getsubTasks(taskId); } public boolean isEndNode(String executionId, String endTaskName, Current current) { return new ProcessCustomDelegate().isEndNode(executionId, endTaskName); } public String getDeploymentID(String processDefinitionKey, Current current) { return new ProcessCustomDelegate().getDeploymentID(processDefinitionKey); } public ProcessDefinitionInfo[] getAllProcessDefinitions(Current current) throws VCIError { return new ProcessCustomDelegate().getAllProcessDefinitions(); } public String getProcessName(String executionid, Current current) { return new ProcessCustomDelegate().getProcessName(executionid); } public String[] getTrainsitionUrlPath(String jbpmDeploymentId, String taskName, String trainsitionName, Current current) throws VCIError { return new ProcessCustomDelegate().getTrainsitionUrlPath(jbpmDeploymentId, taskName, trainsitionName); } public FlowTaskInfo[] getTodoTaskCompositorByUserId(String pluseroid, long first, long pageSize, String taskType, String sql, String orderStr, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getTodoTaskCompositorByUserId(pluseroid, (int)first, (int)pageSize, taskType, sql, orderStr); } public FlowTaskInfo[] getDoneTaskCompositorByUserId(String pluseroid, long first, long pagesize, String taskType, String querySQL, String orderStr, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getDoneTaskCompositorByUserId(pluseroid, (int)first, (int)pagesize, taskType, querySQL, orderStr); } public FlowTaskInfo[] getMyTrackProcessCompositorByUserId(String pluseroid, long first, long pageSize, UserEntityInfo userEnt, String expandSql, String orderStr, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).getMyTrackProcessCompositorByUserId(pluseroid, (int)first, (int)pageSize, expandSql, orderStr); } public String startPocessByPLM(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames, MapTransfersInfo[] mapTransfersInfos, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).startPocessByPLM(processDefinitionKey, flowInstanceInfo, objId, userEnt, userName, outcome, tasknames, taskUserNames, mapTransfersInfos); } public void setTaskAndUserForComplete(String executionid, String[] tasknames, String[][] taskUserNames, UserEntityInfo userEnt, Current current) throws VCIError { new ProcessCustomDelegate(userEnt).setTaskAndUserForComplete(executionid, tasknames, taskUserNames); } public String[] getFlowTaskInfoByDataIds(String[] dataIds, String tableName, Current current) throws VCIError { return new ProcessCustomDelegate().getFlowTaskInfoByDataIds(dataIds, tableName); } public FlowTaskInfo getFlowTaskInfo(String executionid, String taskid, Current current) throws VCIError { return new ProcessCustomDelegate().getFlowTaskInfo(executionid, taskid); } public String startPocessSetUserForVar(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames, String[] keys, String[] values, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).startPocessSetUser(processDefinitionKey, flowInstanceInfo, objId, userEnt, userName, outcome, tasknames, taskUserNames, keys, values); } public boolean completeTaskForVar(String taskId, String outcome, String nextTask, String approvalNote, UserEntityInfo userEnt, String[] userName, String[] keys, String[] values, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).completeTask(taskId, outcome, nextTask, approvalNote, userName, keys, values); } public FlowApproveHistoryInfo[] getHistoryActivityByProInsIdbyPLM(String processInstanceId, Current current) throws VCIError { return new ProcessCustomDelegate().getHistoryActivityByProInsIdbyPLM(processInstanceId); } public String startPocessByPLMv1(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames, MapTransfersInfo[] mapTransfersInfos, String[] objectProperty, String[][] objectPropertyValues, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).startPocessByPLM_v1(processDefinitionKey, flowInstanceInfo, objId, userEnt, userName, outcome, tasknames, taskUserNames, mapTransfersInfos, objectProperty, objectPropertyValues); } public boolean completeTaskByPlatformv1(String taskId, String outcome, String nextTask, String approvalNote, UserEntityInfo userEnt, String[] userName, String[] objectProperty, String[][] objectPropertyValues, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).completeTaskByPlatform_v1(taskId, outcome, nextTask, approvalNote, userEnt, userName, objectProperty, objectPropertyValues); } public boolean completeTasksByPlatformv1(String[] taskIds, String outcome, String nextTask, String approvalNote, UserEntityInfo userEnt, String[] userName, String[] objectProperty, String[][] objectPropertyValues, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).completeTasksByPlatform_v1(taskIds, outcome, nextTask, approvalNote, userEnt, userName, objectProperty, objectPropertyValues); } public String getWorkflowPropertiesValue(String key, Current current) throws VCIError { String result = WorkflowProperties.getStringProperty(key); return result; } public boolean appointTask2(String destActivityName, String tagActivityName, String[] classNames, String executionId, String[] userNames, UserEntityInfo userEnt, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).appointTask2(destActivityName, tagActivityName, classNames, executionId, userNames, userEnt); } public boolean savePlwfinstancetemplate(PlwfinstancetemplateInfo plwfinstancetemplate, PlwfpersonsetInfo[] plwfpersonsetList, Current current) throws VCIError { return new PlwfDelegate().savePlwfinstancetemplate(plwfinstancetemplate, plwfpersonsetList); } public PlwfinstancetemplateInfo[] getPlwfinstancetemplate(Current current) throws VCIError { List plwfinstancetemplateList = new PlwfDelegate().getPlwfinstancetemplate(); return plwfinstancetemplateList.toArray(new PlwfinstancetemplateInfo[plwfinstancetemplateList.size()]); } public boolean deletePlwfinstance(PlwfinstancetemplateInfo plwfinstancetemplate, Current current) throws VCIError { return new PlwfDelegate().deletePlwfinstancetemplate(plwfinstancetemplate); } public PlwfpersonsetInfo[] getPlwfpersonset(String tid, Current current) throws VCIError { List plwfpersonsetList = new PlwfDelegate().getPlwfpersonset(tid); return plwfpersonsetList.toArray(new PlwfpersonsetInfo[plwfpersonsetList.size()]); } public boolean deletePlwfpersonset(PlwfpersonsetInfo plwfpersonset, Current current) throws VCIError { return new PlwfDelegate().deletePlwfpersonset(plwfpersonset); } public PlwfinstancetemplateInfo getPlwfinstancetemplateById(String pid, Current current) throws VCIError { return new PlwfDelegate().getPlwfinstancetemplateById(pid); } public PlwfinstancetemplateInfo[] getPlwfinstancetemplateByClassAndDefault(String plclass, String plisdefault, Current current) throws VCIError { List plwfinstancetemplateList = new PlwfDelegate() .getPlwfinstancetemplateByClassAndDefault(plclass, plisdefault); return plwfinstancetemplateList.toArray(new PlwfinstancetemplateInfo[plwfinstancetemplateList.size()]); } public FlowInstanceInfo[] getFlowInstancesname(String name, Current current) throws VCIError { return new FlowInstanceDelegate().getFlowInstancesname(name); } public String startProcessAndExecuteFirstNode(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames, MapTransfersInfo[] mapTransfersInfos, String[] objectProperty, String[][] objectPropertyValues, Current current) throws VCIError { return new ProcessCustomDelegate(userEnt).startProcessAndExecuteFirstNode(processDefinitionKey, flowInstanceInfo, objId, userEnt, userName, outcome, tasknames, taskUserNames, mapTransfersInfos, objectProperty, objectPropertyValues); } public boolean resetNodeUser(String executionId, String[] taskNames, String[] userNames, Current current) throws VCIError { return new ProcessCustomDelegate().resetNodeUser(executionId, taskNames, userNames); } }