Package com.founder.fix.fixflow.core.impl.identity

Examples of com.founder.fix.fixflow.core.impl.identity.UserTo


      if (taskInstance.getAssignee() != null) {
        if (taskInstance.getAssignee().equals("fixflow_allusers")) {
          throw new FixFlowException("独占处理者不能是所有人");
          // return;
        }
        UserTo userTo = Authentication.findUserInfoByUserId(taskInstance.getAssignee());
        if (userTo == null) {
          throw new FixFlowException("节点: " + this.getId() + " 指定的处理者 " + taskInstance.getAssignee() + " 不存在,请重新检查节点定义!");
        }
      }

      if (taskInstance.getTaskIdentityLinks().size() > 0) {
        for (IdentityLink identityLink : taskInstance.getTaskIdentityLinks()) {

          if (identityLink.getUserId() != null) {
            if (identityLink.getUserId().equals("fixflow_allusers")) {
              return;
            }
            UserTo userTo = Authentication.findUserInfoByUserId(identityLink.getUserId());
            if (userTo == null) {
              // throw new
              // FixFlowException("节点: "+this.getId()+" 指定的处理者 "+
              // identityLink.getUserId() +" 不存在,请重新检查节点定义!");
            } else {
View Full Code Here


   
   
    if(taskInstanceEntity.getAssignee()!=null){
     
      String userId=taskInstanceEntity.getAssignee();
      UserTo userTo=Authentication.findUserInfoByUserId(userId);
      userTos.add(userTo);
      return userTos;
    }
   
    for (IdentityLink identityLink : identityLinks) {
      if(identityLink.getType()==IdentityLinkType.candidate){
       
        if(identityLink.getUserId()!=null){
          String userId=identityLink.getUserId();
          UserTo userTo=Authentication.findUserInfoByUserId(userId);
          userTos.add(userTo);
        }
        else{
          if(identityLink.getGroupId()!=null){
           
View Full Code Here

    return resultList;
  }
 
  public Map<String, Object> getUserInfo(Map<String, Object> params) throws SQLException {
    Map<String,Object> result= new HashMap<String,Object>();
    UserTo user = null;
    String userId = (String) params.get("viewUserId");
    ProcessEngine engine = getProcessEngine(userId);
   
    String path = StringUtil.getString(params.get("path"));
    path = path+"/icon/";
View Full Code Here

        Map<String,Object> instances = tmp.getPersistentState();
        String userId = StringUtil.getString(instances.get("PI_INITIATOR"));
        if(StringUtil.isEmpty(userId)){
          instances.put("userName", "(未知用户)");
        }else{
          UserTo user = identsvz.getUserTo(userId);
          if(user!=null){
            instances.put("userName", user.getUserName());
          }else{
            instances.put("userName", userId+"(未知用户)");
          }
        }
       
View Full Code Here

            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 = getUserTo(userId,engine);
          }
          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()) {
View Full Code Here

    return taskInfo;
  }
 
  protected static UserTo getUserTo(String userId,ProcessEngine engine) {
    try {
      UserTo user = engine.getIdentityService().getUserTo(userId);
      return user;
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
View Full Code Here

      if (userTos.size() > y) {
        userTos = userTos.subList(0, y);
        x = 1;
      }
      for (int i = 0; i < userTos.size(); i++) {
        UserTo userTo = userTos.get(i);
        if (i == userTos.size() - 1) {
          nameList = nameList + userTo.getUserName() + "("
              + userTo.getUserId() + ")";
        } else {
          nameList = nameList + userTo.getUserName() + "(" + userTo.getUserId() + "),  ";
        }
      }
      if (x == 1) {
        nameList = nameList + " .......";
      }
View Full Code Here

    String assigneeName = "";
    if (StringUtil.isEmpty(userId)) {
      return "";
    }
    try {
      UserTo user = getUserTo(userId,engine);
      assigneeName = user.getUserName();
    } catch (Exception e) {
      e.printStackTrace();
    }
    return assigneeName;
  }
View Full Code Here

      List<GroupDefinition> groupDefinitions = Context.getProcessEngineConfiguration().getGroupDefinitions();

      if (taskInstance.getAssignee() != null) {
        String to = taskInstance.getAssignee();
        if (!to.equals("")) {
          UserTo userTo = userDefinition.findUserByUserId(to);
          if (userTo != null) {
            String eamil = StringUtil.getString(userTo.getPropertyValue("EMAIL"));
            if (eamil != null && !eamil.equals("")) {
              sendMail(eamil, mailTitle, mailContent,taskInstance);
            }
          }
        }

      } else {

        String to = "";

        for (IdentityLink identityLink : taskInstance.getTaskIdentityLinks()) {

          if (identityLink.getUserId() != null) {
            UserTo userTo = Authentication.findUserInfoByUserId(identityLink.getUserId());
            if (userTo != null) {
              String eamil = StringUtil.getString(userTo.getPropertyValue("EMAIL"));
              if (eamil != null && !eamil.equals("")) {
                // sendMail(eamil,title,mailContent);
                to = to + eamil + ",";
              }
            }
          } else {
            String groupIdString = identityLink.getGroupId();
            String groupTypeString = identityLink.getGroupType();
            GroupTo groupTo = Authentication.findGroupByGroupIdAndType(groupIdString, groupTypeString);
            if (groupTo != null) {

              for (GroupDefinition groupDefinition : groupDefinitions) {
                if (groupDefinition.getId().equals(groupTypeString)) {
                  List<UserTo> userTos = groupDefinition.findUserByGroupId(groupIdString);
                  for (UserTo userTo : userTos) {
                    if (userTo != null) {
                      String eamil = StringUtil.getString(userTo.getPropertyValue("EMAIL"));
                      if (eamil != null && !eamil.equals("")) {
                        // sendMail(eamil,title,mailContent);
                        to = to + eamil + ",";
                      }
                    }
View Full Code Here

    List<UserTo> userTos=new ArrayList<UserTo>();
    UserDefinition userDefinition=commandContext.getProcessEngineConfigurationImpl().getUserDefinition();
    for (Map<String, Object> map : listmMaps) {
      String userIdDataString=StringUtil.getString(map.get("USERID"));
      if(userIdDataString!=null&&!userIdDataString.equals("")){
        UserTo userTo=userDefinition.findUserByUserId(userIdDataString);
        userTos.add(userTo);
      }
    }
    return userTos;
  }
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.impl.identity.UserTo

Copyright © 2018 www.massapicom. 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.