Examples of IdentityService


Examples of com.founder.fix.fixflow.core.IdentityService

      Long count = tq.count();
      List<Map<String,Object>> instanceMaps = new ArrayList<Map<String,Object>>();
     
      Pagination page = new Pagination(pageIndex,rowNum);
      page.setTotal(count.intValue());
      IdentityService identsvz = engine.getIdentityService();
     
      for(TaskInstance tmp:lts){
        Map<String,Object> instances = tmp.getPersistentState();
//        String path = StringUtil.getString(filter.get("path"));
//        path = path+"/icon/";
//        File newFile = new File(path);
//        FileUtil.makeParent(new File(path+"ss.ss"));
//       
//        String[] icons = newFile.list();
        String userId = StringUtil.getString(instances.get("PI_START_AUTHOR"));
//        for(String tmp2:icons){
//          if(tmp2.startsWith(userId)){
//            instances.put("icon", "icon/"+tmp2);
//          }
//        }
       
//        instances.put("icon", "icon/"+userId+"_small.png");
        if(StringUtil.isNotEmpty(userId)){
          UserTo user = identsvz.getUserTo(userId);
          if(user!=null){
            instances.put("userName", user.getUserName());
          }else{
            instances.put("userName", userId+"(未知用户)");
          }
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

   
    Map<String,Object> resultMap = new HashMap<String,Object>();
    String userId = StringUtil.getString(filter.get("userId"));
    ProcessEngine engine = getProcessEngine(userId);
    RuntimeService runtimeService = engine.getRuntimeService();
    IdentityService identityService = engine.getIdentityService();
    FlowUtilServiceImpl flowUtil = new FlowUtilServiceImpl();
    String processDefinitionKey = StringUtil.getString(filter.get("processDefinitionKey"));
    String processInstanceId    = StringUtil.getString(filter.get("processInstanceId"));
    String title        = StringUtil.getString(filter.get("title"));
//    String subject        = StringUtil.getString(filter.get("subject"));
    String bizKey        = StringUtil.getString(filter.get("bizKey"));
    String initor        = StringUtil.getString(filter.get("initor"));
    String status        = StringUtil.getString(filter.get("status"));
    String processType       = StringUtil.getString(filter.get("processType"));
    ProcessInstanceType processInstanceStatus = FlowUtilServiceImpl.getInstanceStaus(status);
    try{
     
      String pageI = StringUtil.getString(filter.get("pageIndex"));
      String rowI = StringUtil.getString(filter.get("pageSize"));
      int pageIndex=1;
      int rowNum   =15;
      if(StringUtil.isNotEmpty(pageI)){
        pageIndex = Integer.valueOf(pageI);
      }
      if(StringUtil.isNotEmpty(rowI)){
        rowNum = Integer.valueOf(rowI);
      }
      ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery();
      if(StringUtil.isNotEmpty(processDefinitionKey))
        processInstanceQuery.processDefinitionKey(processDefinitionKey);
      if(StringUtil.isNotEmpty(processInstanceId))
        processInstanceQuery.processInstanceId(processInstanceId);
      if(StringUtil.isNotEmpty(title))
        processInstanceQuery.subjectLike(title);
      if(StringUtil.isNotEmpty(bizKey))
        processInstanceQuery.processInstanceBusinessKeyLike(bizKey);
      if(processInstanceStatus !=null){
        processInstanceQuery.processInstanceStatus(processInstanceStatus);
      }
      if(StringUtil.isNotEmpty(initor))
        processInstanceQuery.initiator(initor);
     
     
      if(StringUtil.isNotEmpty(processType)){
        if(processType.equals("initor"))
          processInstanceQuery.initiator(userId);
        else
          processInstanceQuery.taskParticipants(userId);
      }
     
      String processDefinitionName     = StringUtil.getString(filter.get("processDefinitionName"));
      if(StringUtil.isNotEmpty(processDefinitionName))
        processInstanceQuery.processDefinitionNameLike(processDefinitionName);
     
      processInstanceQuery.orderByUpdateTime().desc();
      Date dates = null;
      Date datee = null;
      String dss = StringUtil.getString(filter.get("startTimeS"));
      String dse = StringUtil.getString(filter.get("startTimeE"));
      if(StringUtil.isNotEmpty(dss)){
        dates = DateUtil.stringToDate(dss,"yyyy-MM-dd");
      }
      if(StringUtil.isNotEmpty(dse)){
        String endTime = "235959999";
        dse += endTime;
        datee = DateUtil.stringToDate(dse,"yyyy-MM-ddHHmmssSSS");
      }
      if(dates!=null)
        processInstanceQuery.startTimeBefore(dates);
     
      if(datee!=null)
        processInstanceQuery.startTimeAfter(datee);
     
     
      List<ProcessInstance> processInstances = processInstanceQuery.listPagination(pageIndex, rowNum);
     
      List<Map<String,Object>> instanceMaps = new ArrayList<Map<String,Object>>();
      for(ProcessInstance tmp: processInstances){
        Map<String, Object> persistentState = tmp.getPersistentState();
        String processDefinitionId = tmp.getProcessDefinitionId();
        ProcessDefinitionBehavior processDefinitionBehavior = engine.getModelService().getProcessDefinition(processDefinitionId);
        String processDefinitionName1 = processDefinitionBehavior.getName();
        persistentState.put("processDefinitionName", processDefinitionName1);
        String nowNodeInfo = flowUtil.getShareTaskNowNodeInfo(tmp.getId());
        persistentState.put("nowNodeInfo", nowNodeInfo);
        UserTo user = identityService.getUserTo(tmp.getStartAuthor());
        if(user !=null){
          persistentState.put("startAuthorName", user.getUserName());
        }else{
          persistentState.put("startAuthorName", tmp.getStartAuthor());
        }
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

      Long count = tq.count();
      List<Map<String,Object>> instanceMaps = new ArrayList<Map<String,Object>>();
      Pagination page = new Pagination(pageIndex,rowNum);
      page.setTotal(count.intValue());
      IdentityService identityService = engine.getIdentityService();
      for(ProcessInstance tmp:instances){
        Map<String, Object> persistentState = tmp.getPersistentState();
        ProcessEngine processEngine = ProcessEngineManagement.getDefaultProcessEngine();
        String processDefinitionId = tmp.getProcessDefinitionId();
        ProcessDefinitionBehavior processDefinitionBehavior = processEngine.getModelService().getProcessDefinition(processDefinitionId);
        String processDefinitionName = processDefinitionBehavior.getName();
        persistentState.put("processDefinitionName", processDefinitionName);
       
       
       
        UserTo user = identityService.getUserTo(tmp.getStartAuthor());
        if(user !=null){
          persistentState.put("startAuthorName", user.getUserName());
        }else{
          persistentState.put("startAuthorName", tmp.getStartAuthor());
        }
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

      ProcessEngine engine = getProcessEngine(userId);
      ProcessInstance processInstance = engine.getRuntimeService().getProcessInstance(processInstanceId);
      String processName = processInstance.getProcessDefinition().getName();
      try{
        TaskQuery tq = engine.getTaskService().createTaskQuery();
        IdentityService identityService = engine.getIdentityService();
        tq.processInstanceId(processInstanceId);
        tq.taskIsEnd().orderByEndTime().asc();
        List<TaskInstance> instances = tq.list();
        List<Map<String,Object>> instanceMaps = new ArrayList<Map<String,Object>>();
        for(TaskInstance tmp:instances){
          Map<String,Object> instanceMap = tmp.getPersistentState();
          String assigneeUserId = tmp.getAssignee();
          if(StringUtil.isNotEmpty(assigneeUserId)){
            UserTo tmpUser = identityService.getUserTo(assigneeUserId);
            if(tmpUser!=null){
              instanceMap.put("assgneeUserName", tmpUser.getUserName());
            }
          }else{
            instanceMap.put("assgneeUserName", "(空用户名)");
          }
          instanceMaps.add(instanceMap);
        }
        tq.taskNotEnd().orderByTaskCreateTime().asc();
        List<TaskInstance> instancesNotEnd = tq.list();
       
        List<Map<String,Object>> notEndInstanceMaps = new ArrayList<Map<String,Object>>();
        for(TaskInstance tmp:instancesNotEnd){
          Map<String,Object> instanceMap = tmp.getPersistentState();
          String assigneeUserId = tmp.getAssignee();
          if(StringUtil.isNotEmpty(assigneeUserId)){
            UserTo tmpUser = identityService.getUserTo(assigneeUserId);
            if(tmpUser!=null){
              instanceMap.put("assgneeUserName", tmpUser.getUserName());
            }
          }else{
            instanceMap.put("assgneeUserName", "(空用户名)");
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

  public Map<String, Object> getAllUsers(Map<String, Object> params) throws SQLException {
    Map<String,Object> resultMap = new HashMap<String,Object>();
    String userId = StringUtil.getString(params.get("userId"));
    String queryInfo = StringUtil.getString(params.get("queryInfo"));
    ProcessEngine processEngine = getProcessEngine(userId);
    IdentityService identityService = processEngine.getIdentityService();
    try{
      String pageI = StringUtil.getString(params.get("pageIndex"));
      String rowI = StringUtil.getString(params.get("pageSize"));
      int pageIndex=1;
      int rowNum   =15;
      if(StringUtil.isNotEmpty(pageI)){
        pageIndex = Integer.valueOf(pageI);
      }
      if(StringUtil.isNotEmpty(rowI)){
        rowNum = Integer.valueOf(rowI);
      }
     
      Map<String,Object> queryMap = new HashMap<String,Object>();
      String queryUserId = StringUtil.getString(params.get("queryUserId"));
      if(StringUtil.isNotEmpty(queryUserId)){
        queryMap.put("USERID", queryUserId);
      }
      String queryUserName = StringUtil.getString(params.get("queryUserName"));
      if(StringUtil.isNotEmpty(queryUserName)){
        queryMap.put("USERNAME", queryUserName);
      }
      if(StringUtil.isNotEmpty(queryInfo)){
        queryMap.put("USERID", queryInfo);
        queryMap.put("USERNAME", queryInfo);
      }
      int firstResult = rowNum*(pageIndex-1)+1;//起始行
      int maxResults = pageIndex*rowNum;//结束行
      Map<String,Object> userListMap = identityService.getUserTos(new Page(firstResult,maxResults), queryMap);
      List<UserTo> userTos = (List<UserTo>)userListMap.get("userList");
      int count = (Integer)userListMap.get("count");
      List<Map<String,Object>> userList = new ArrayList<Map<String,Object>>();
      Pagination page = new Pagination(pageIndex,rowNum);
      page.setTotal(count);
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

    Map<String,Object> resultMap = new HashMap<String,Object>();
    String userId = StringUtil.getString(params.get("userId"));
    String taskId = StringUtil.getString(params.get("taskId"));
    ProcessEngine processEngine = getProcessEngine(userId);
    TaskService taskService = processEngine.getTaskService();
    IdentityService identityService = processEngine.getIdentityService();
    List<Map<String,Object>> resultList = new ArrayList<Map<String,Object>>();
    try{
      List<TaskInstance> taskInstances = taskService.getRollBackTask(taskId);
      for(TaskInstance task :taskInstances){
        Map<String,Object> taskMap = new HashMap<String,Object>();
        taskMap.put("taskId", task.getId());
        taskMap.put("taskName", task.getName());
        taskMap.put("startTime", task.getCreateTime());
        taskMap.put("endTime", task.getEndTime());
        UserTo user = identityService.getUserTo(task.getAssignee());
        taskMap.put("assignee", task.getAssignee());
        if(user !=null){
          taskMap.put("assigneeUserName", user.getUserName());
        }
        resultList.add(taskMap);
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

    String assignee = taskInstanceQueryTo.getAssignee();
    ProcessEngine engine = getProcessEngine(null);
    ProcessDefinitionBehavior processDefinition = engine.getModelService().getProcessDefinition(taskInstanceQueryTo.getProcessDefinitionId());
    String nodeName = processDefinition.getFlowElement(taskInstanceQueryTo.getNodeId()).getName();
    taskInfo = taskInfo + nodeName;
    IdentityService identityService = engine.getIdentityService();
    if (assignee == null) {
      List<UserTo> userTos=new ArrayList<UserTo>();
      Map<String, List<GroupTo>> groupTosMap=new HashMap<String, List<GroupTo>>();
      List<IdentityLink> identityLinkList = taskInstanceQueryTo.getIdentityLinkQueryToList();
      for (IdentityLink identityLinkQueryTo : identityLinkList) {
        String userId = identityLinkQueryTo.getUserId();
        if (userId == null) {
          String groupTypeId = identityLinkQueryTo.getGroupType();
          String groupId = identityLinkQueryTo.getGroupId();
          GroupTo groupTo = identityService.getGroup(groupId, groupTypeId);
          if (groupTo == null) {
            continue;
          }
          if(groupTosMap.get(groupTypeId)!=null){
            groupTosMap.get(groupTypeId).add(groupTo);
          }
          else{
            List<GroupTo> groupTos=new ArrayList<GroupTo>();
            groupTos.add(groupTo);
            groupTosMap.put(groupTypeId, groupTos);
          }
         
        } else {
          UserTo userTo=null;
          if (userId.equals("fixflow_allusers")) {
            userTo=new UserTo("fixflow_allusers", "所有人", null);
          } else {
            userTo= identityService.getUserTo(userId);
          }
          if(userTo!=null){
            userTos.add(userTo);
          }
        }
      }
      if(userTos.size()>0){
        String groupTypeName="";
        groupTypeName = "用户";
        taskInfo += "(共享 " + groupTypeName + " : ";
        for (int i = 0; i < userTos.size(); i++) {
          UserTo userTo=userTos.get(i);
          if(i==userTos.size()-1){
            taskInfo += userTo.getUserName();
          }
          else{
            taskInfo += userTo.getUserName()+",";
          }
        }
        taskInfo=taskInfo+")";
      }
      for (String groupToKey : groupTosMap.keySet()) {
        List<GroupTo> groupTos=groupTosMap.get(groupToKey);
        GroupDefinition groupDefinition = identityService.getGroupDefinition(groupToKey);
        String groupTypeName = "";
        groupTypeName = groupDefinition.getName();
        taskInfo += "(共享 " + groupTypeName + " : ";
        taskInfo += listToStr(groupTos, ",",groupDefinition) + ")";
      }
    } else {
      UserTo user = identityService.getUserTo(assignee);
      String username = user.getUserName();
      username="<span title='"+username+"("+assignee+")'>"+username+"</span>";
      taskInfo = taskInfo + " (处理者 : " + username + ") ";
    }
    return taskInfo;
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

  public Map<String, Object> getAllUsers(Map<String, Object> params) throws SQLException {
    Map<String,Object> resultMap = new HashMap<String,Object>();
    String userId = StringUtil.getString(params.get("userId"));
    ProcessEngine processEngine = getProcessEngine(userId);
    IdentityService identityService = processEngine.getIdentityService();
    try{
      String pageI = StringUtil.getString(params.get("pageIndex"));
      String rowI = StringUtil.getString(params.get("pageSize"));
      int pageIndex=1;
      int rowNum   =15;
      if(StringUtil.isNotEmpty(pageI)){
        pageIndex = Integer.valueOf(pageI);
      }
      if(StringUtil.isNotEmpty(rowI)){
        rowNum = Integer.valueOf(rowI);
      }
      int firstResult = rowNum*(pageIndex-1)+1;//起始行
      int maxResults = pageIndex*rowNum;//结束行
      Map<String,Object> queryMap = new HashMap<String,Object>();
      String queryUserId = StringUtil.getString(params.get("queryUserId"));
      if(StringUtil.isNotEmpty(queryUserId)){
        queryMap.put("USERID", queryUserId);
      }
      String queryUserName = StringUtil.getString(params.get("queryUserName"));
      if(StringUtil.isNotEmpty(queryUserName)){
        queryMap.put("USERNAME", queryUserName);
      }
      Map<String,Object> userListMap = identityService.getUserTos(new Page(firstResult,maxResults), queryMap);
      List<UserTo> userTos = (List<UserTo>)userListMap.get("userList");
      int count = (Integer)userListMap.get("count");
      List<Map<String,Object>> userList = new ArrayList<Map<String,Object>>();
      Pagination page = new Pagination(pageIndex,rowNum);
      page.setTotal(count);
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

    if(StringUtil.isEmpty(groupType)){
      return resultMap;
    }
    String userId = StringUtil.getString(params.get("userId"));
    ProcessEngine processEngine = getProcessEngine(userId);
    IdentityService identityService = processEngine.getIdentityService();
    try{
      String pageI = StringUtil.getString(params.get("pageIndex"));
      String rowI = StringUtil.getString(params.get("pageSize"));
      int pageIndex=1;
      int rowNum   =15;
      if(StringUtil.isNotEmpty(pageI)){
        pageIndex = Integer.valueOf(pageI);
      }
      if(StringUtil.isNotEmpty(rowI)){
        rowNum = Integer.valueOf(rowI);
      }
      int firstResult = rowNum*(pageIndex-1)+1;//起始行
      int maxResults = pageIndex*rowNum;//结束行
      Map<String,Object> queryMap = new HashMap<String,Object>();
      String queryGroupId = StringUtil.getString(params.get("queryGroupId"));
      if(StringUtil.isNotEmpty(queryGroupId)){
        queryMap.put("GROUPID", queryGroupId);
      }
      String queryGroupName = StringUtil.getString(params.get("queryGroupName"));
      if(StringUtil.isNotEmpty(queryGroupName)){
        queryMap.put("GROUPNAME", queryGroupName);
      }
      String supId = StringUtil.getString(params.get("supId"));
      if(StringUtil.isNotEmpty(supId)){
        queryMap.put("SUPID", supId);
      }
     
      GroupDefinition groupDefinition = identityService.getGroupDefinition(groupType);
      Map<String,Object> map = groupDefinition.findGroups(new Page(firstResult,maxResults), queryMap);
      List<GroupTo> groupTos = (List<GroupTo>)map.get("groupList");
      List<Map<String,Object>> groupList = new ArrayList<Map<String,Object>>();
      int count = (Integer)map.get("count");
      Pagination page = new Pagination(pageIndex,rowNum);
View Full Code Here

Examples of com.founder.fix.fixflow.core.IdentityService

 
  public List<Map<String, Object>> getAllGroupDefinition(Map<String,Object> params) throws SQLException {
    List<Map<String,Object>> resultList = new ArrayList<Map<String,Object>>();
    String userId = StringUtil.getString(params.get("userId"));
    ProcessEngine processEngine = getProcessEngine(userId);
    IdentityService identityService = processEngine.getIdentityService();
    try{
      List<GroupDefinition> list = identityService.getAllGroupDefinitions();
      for(GroupDefinition group: list){
        Map<String,Object> groupMap = new HashMap<String,Object>();
        groupMap.put("typeId", group.getId());
        groupMap.put("typeName", group.getName());
        if(!group.getGroupInfo().getSupGroupIdField().equals(group.getGroupInfo().getGroupIdField())){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.