Examples of newUser()


Examples of org.activiti.engine.IdentityService.newUser()

  public void shouldProcessCriticalIssueRequest() throws Exception {
    // get a handle on the identity-service
    IdentityService identityService = activitiRule.getIdentityService();

    // create a new user to create a new request
    User requester = identityService.newUser("Micha Kops");
    identityService.saveUser(requester);

    // create group service and assign the user to it
    Group serviceGroup = identityService.newGroup("service");
    identityService.saveGroup(serviceGroup);
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

    identityService.saveGroup(serviceGroup);
    identityService.createMembership(requester.getId(),
        serviceGroup.getId());

    // create a new user for an it-support employee
    User itguy = identityService.newUser("itguy");
    identityService.saveUser(itguy);

    // create a group it-support for critical issues
    Group itSupportGroup = identityService.newGroup("itsupport-critical");
    itSupportGroup.setName("IT Support for Critical Issues");
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

        if (getProcessEngine() == null) {
            throw new NullPointerException("Please configure a processEngine instance for this command");
        }
        IdentityService identityService = getProcessEngine().getIdentityService();

        User user = identityService.newUser(id);
        user.setEmail(password);
        identityService.saveUser(user);

        identityService.createMembership(id, groupId);
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

    @Deployment(resources = "diagrams/threeTask.bpmn")
    public void testSkip() {

        // 建立用户与组的关系
        IdentityService identityService = activitiRule.getIdentityService();
        User user1 = identityService.newUser("user1");
        identityService.saveUser(user1);
        User user2 = identityService.newUser("user2");
        identityService.saveUser(user2);

        Group group1 = identityService.newGroup("group1");
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

        // 建立用户与组的关系
        IdentityService identityService = activitiRule.getIdentityService();
        User user1 = identityService.newUser("user1");
        identityService.saveUser(user1);
        User user2 = identityService.newUser("user2");
        identityService.saveUser(user2);

        Group group1 = identityService.newGroup("group1");
        identityService.saveGroup(group1);
        identityService.createMembership("user1", "group1");
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

  public void execute(DelegateExecution execution) throws Exception {

    IdentityService identityService = execution.getEngineServices().getIdentityService();
   
    String username = "Kermit";
    User user = identityService.newUser(username);
    user.setPassword("123");
    user.setFirstName("Manually");
    user.setLastName("created");
    identityService.saveUser(user);
   
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

    }
  }
 
  protected void createUsers() {
    IdentityService identityService = processEngine.getIdentityService();
    User user = identityService.newUser("kermit");
    user.setFirstName("Kermit");
    user.setLastName("the Frog");
    user.setPassword("kermit");
    identityService.saveUser(user);
   
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

    if(userInfo == null || userInfo.getId() == null) {
      throw new ActivitiException("No user id supplied");
    }

    if (identityService.createUserQuery().userId(userInfo.getId()).count() == 0) {
       User user = identityService.newUser(userInfo.getId());
       user.setFirstName(userInfo.getFirstName());
       user.setLastName(userInfo.getLastName());
       user.setPassword(userInfo.getPassword());
       user.setEmail(userInfo.getEmail());
       identityService.saveUser(user);
View Full Code Here

Examples of org.activiti.engine.IdentityService.newUser()

        if (getProcessEngine() == null) {
            throw new NullPointerException("Please configure a processEngine instance for this command");
        }
        IdentityService identityService = getProcessEngine().getIdentityService();

        User user = identityService.newUser(id);
        user.setEmail(password);
        identityService.saveUser(user);

        identityService.createMembership(id, groupId);
View Full Code Here

Examples of org.camunda.bpm.engine.IdentityService.newUser()

    UserProfileDto profile = userDto.getProfile();
    if(profile == null || profile.getId() == null) {
      throw new InvalidRequestException(Status.BAD_REQUEST, "request object must provide profile information with valid id.");
    }

    User newUser = identityService.newUser(profile.getId());
    profile.update(newUser);

    if(userDto.getCredentials() != null) {
      newUser.setPassword(userDto.getCredentials().getPassword());
    }
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.