Package org.activiti.engine.task

Examples of org.activiti.engine.task.IdentityLink


      .getId();
   
    runtimeService.addParticipantGroup(processInstanceId, "muppets");
   
    List<IdentityLink> identityLinks = runtimeService.getIdentityLinksForProcessInstance(processInstanceId);
    IdentityLink identityLink = identityLinks.get(0);
   
    assertEquals("muppets", identityLink.getGroupId());
    assertNull("kermit", identityLink.getUserId());
    assertEquals(IdentityLinkType.PARTICIPANT, identityLink.getType());
    assertEquals(processInstanceId, identityLink.getProcessInstanceId());
   
    assertEquals(1, identityLinks.size());
   
    if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.AUDIT)) {
      List<Event> processInstanceEvents = runtimeService.getProcessInstanceEvents(processInstanceId);
View Full Code Here


      .getId();
   
    runtimeService.addUserIdentityLink(processInstanceId, "kermit", "interestee");
   
    List<IdentityLink> identityLinks = runtimeService.getIdentityLinksForProcessInstance(processInstanceId);
    IdentityLink identityLink = identityLinks.get(0);
   
    assertNull(identityLink.getGroupId());
    assertEquals("kermit", identityLink.getUserId());
    assertEquals("interestee", identityLink.getType());
    assertEquals(processInstanceId, identityLink.getProcessInstanceId());
   
    assertEquals(1, identityLinks.size());

    runtimeService.deleteUserIdentityLink(processInstanceId, "kermit", "interestee");
   
View Full Code Here

      .getId();
   
    runtimeService.addGroupIdentityLink(processInstanceId, "muppets", "playing");
   
    List<IdentityLink> identityLinks = runtimeService.getIdentityLinksForProcessInstance(processInstanceId);
    IdentityLink identityLink = identityLinks.get(0);
   
    assertEquals("muppets", identityLink.getGroupId());
    assertNull("kermit", identityLink.getUserId());
    assertEquals("playing", identityLink.getType());
    assertEquals(processInstanceId, identityLink.getProcessInstanceId());
   
    assertEquals(1, identityLinks.size());

    runtimeService.deleteGroupIdentityLink(processInstanceId, "muppets", "playing");
   
View Full Code Here

      .getId();
   
    taskService.addCandidateUser(taskId, "kermit");
   
    List<IdentityLink> identityLinks = taskService.getIdentityLinksForTask(taskId);
    IdentityLink identityLink = identityLinks.get(0);
   
    assertNull(identityLink.getGroupId());
    assertEquals("kermit", identityLink.getUserId());
    assertEquals(IdentityLinkType.CANDIDATE, identityLink.getType());
    assertEquals(taskId, identityLink.getTaskId());
   
    assertEquals(1, identityLinks.size());

    taskService.deleteCandidateUser(taskId, "kermit");
   
View Full Code Here

      .getId();
   
    taskService.addCandidateGroup(taskId, "muppets");
   
    List<IdentityLink> identityLinks = taskService.getIdentityLinksForTask(taskId);
    IdentityLink identityLink = identityLinks.get(0);
   
    assertEquals("muppets", identityLink.getGroupId());
    assertNull("kermit", identityLink.getUserId());
    assertEquals(IdentityLinkType.CANDIDATE, identityLink.getType());
    assertEquals(taskId, identityLink.getTaskId());
   
    assertEquals(1, identityLinks.size());
   
    if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.AUDIT)) {
      List<Event> taskEvents = taskService.getTaskEvents(taskId);
View Full Code Here

      .getId();
   
    taskService.addUserIdentityLink(taskId, "kermit", "interestee");
   
    List<IdentityLink> identityLinks = taskService.getIdentityLinksForTask(taskId);
    IdentityLink identityLink = identityLinks.get(0);
   
    assertNull(identityLink.getGroupId());
    assertEquals("kermit", identityLink.getUserId());
    assertEquals("interestee", identityLink.getType());
    assertEquals(taskId, identityLink.getTaskId());
   
    assertEquals(1, identityLinks.size());

    taskService.deleteUserIdentityLink(taskId, "kermit", "interestee");
   
View Full Code Here

      .getId();
   
    taskService.addGroupIdentityLink(taskId, "muppets", "playing");
   
    List<IdentityLink> identityLinks = taskService.getIdentityLinksForTask(taskId);
    IdentityLink identityLink = identityLinks.get(0);
   
    assertEquals("muppets", identityLink.getGroupId());
    assertNull("kermit", identityLink.getUserId());
    assertEquals("playing", identityLink.getType());
    assertEquals(taskId, identityLink.getTaskId());
   
    assertEquals(1, identityLinks.size());

    taskService.deleteGroupIdentityLink(taskId, "muppets", "playing");
   
View Full Code Here

      .getId();

    List<IdentityLink> identityLinks = taskService.getIdentityLinksForTask(taskId);

    assertEquals(1, identityLinks.size());
    IdentityLink identityLink = identityLinks.get(0);

    assertEquals("user", identityLink.getUserId());
  }
View Full Code Here

    List<IdentityLink> identityLinks = taskService.getIdentityLinksForTask(taskId);
    assertNotNull(identityLinks);
    assertEquals( 1, identityLinks.size());

    IdentityLink identityLink = identityLinks.get(0);
    assertEquals("muppets", identityLink.getGroupId());
    assertEquals(null, identityLink.getUserId());
    assertEquals(IdentityLinkType.CANDIDATE, identityLink.getType());
    assertEquals(taskId, identityLink.getTaskId());

    taskService.deleteCandidateGroup(taskId, "muppets");

    assertEquals(0, taskService.getIdentityLinksForTask(taskId).size());
  }
View Full Code Here

    taskService.delegateTask(taskId, "fozzie");

    List<IdentityLink> identityLinks = taskService.getIdentityLinksForTask(taskId);
    assertEquals(2, identityLinks.size());

    IdentityLink assignee = identityLinks.get(0);
    assertEquals("fozzie", assignee.getUserId());
    assertNull(assignee.getGroupId());
    assertEquals(IdentityLinkType.ASSIGNEE, assignee.getType());
   
    IdentityLink owner = identityLinks.get(1);
    assertEquals("kermit", owner.getUserId());
    assertNull(owner.getGroupId());
    assertEquals(IdentityLinkType.OWNER, owner.getType());

    //cleanup
    taskService.deleteTask(taskId, true);
    identityService.deleteUser("kermit");
    identityService.deleteUser("fozzie");
View Full Code Here

TOP

Related Classes of org.activiti.engine.task.IdentityLink

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.