1 List<OrgUnit> list = new ArrayList<OrgUnit>(); 2 3 // 1、查询出执行者 4 String sql = "select t.fCreatePsnID from PM_KM_Executors t where t.fMasterID = ‘" +rowID+ "‘"; 5 Table table = KSQL.select(sql, null, "/PM/knowledge/data", null); 6 Iterator<Row> it = table.iterator(); 7 8 while(it.hasNext()){ 9 // 2、添加执行者 10 Row row = it.next(); 11 list.add(OrgUtils.findOnePersonMemberByID(null,row.getString("fCreatePsnID")).get(0)); 12 } 13 Map<String, Object> varMap = new HashMap<String, Object>(); 14 varMap.put("sKindID", com.justep.system.process.TaskKind.NOTICE ); 15 Task task = TaskHelper.createTask(title, "/PM/knowledge/process/publishKnowledge/publishKnowledgeProcess", "businessActivity2", 16 "/PM/knowledge/process/publishKnowledge/htmlActivity.w", "/PM/knowledge/process/publishKnowledge/businessActivity2.w", 17 rowID, list,varMap); 18 task.setExecuteMode2(TaskExecuteMode2.FINISH_WHEN_OPEN); 19 task.save();
时间: 2024-11-08 21:25:19