Package org.camunda.bpm.engine.task

Examples of org.camunda.bpm.engine.task.Event


    taskService.createAttachment(IMAGE_PNG, task.getId(), null, IMAGE_NAME, IMAGE_DESC, IMAGE_URL);

    // now there is a task event created
    List<Event> events = taskService.getTaskEvents(task.getId());
    assertEquals(1, events.size());
    Event event = events.get(0);
    assertEquals(1, event.getMessageParts().size());
    assertEquals(IMAGE_NAME, event.getMessageParts().get(0));
    assertEquals(task.getId(), event.getTaskId());
    assertEquals(ACTION_ADD_ATTACHMENT, event.getAction());
    assertEquals(IMAGE_NAME, event.getMessage());
    assertEquals(null, event.getProcessInstanceId());
    assertNotNull(event.getTime().getTime() <= ClockUtil.getCurrentTime().getTime());

    assertNoCommentsForTask();
  }
View Full Code Here


    taskService.deleteAttachment(attachment.getId());

    // now there is a task event created
    List<Event> events = taskService.getTaskEvents(task.getId());
    assertEquals(2, events.size());
    Event event = events.get(0);
    assertEquals(1, event.getMessageParts().size());
    assertEquals(IMAGE_NAME, event.getMessageParts().get(0));
    assertEquals(task.getId(), event.getTaskId());
    assertEquals(ACTION_DELETE_ATTACHMENT, event.getAction());
    assertEquals(IMAGE_NAME, event.getMessage());
    assertEquals(null, event.getProcessInstanceId());
    assertNotNull(event.getTime().getTime() <= ClockUtil.getCurrentTime().getTime());

    assertNoCommentsForTask();
  }
View Full Code Here

    assertEquals(1, identityLinks.size());

    if (processEngineConfiguration.getHistoryLevel().getId()>= ProcessEngineConfigurationImpl.HISTORYLEVEL_FULL) {
      List<Event> taskEvents = taskService.getTaskEvents(taskId);
      assertEquals(1, taskEvents.size());
      Event taskEvent = taskEvents.get(0);
      assertEquals(Event.ACTION_ADD_GROUP_LINK, taskEvent.getAction());
      List<String> taskEventMessageParts = taskEvent.getMessageParts();
      assertEquals("muppets", taskEventMessageParts.get(0));
      assertEquals(IdentityLinkType.CANDIDATE, taskEventMessageParts.get(1));
      assertEquals(2, taskEventMessageParts.size());
    }

    taskService.deleteCandidateGroup(taskId, "muppets");

    if (processEngineConfiguration.getHistoryLevel().getId()>= ProcessEngineConfigurationImpl.HISTORYLEVEL_FULL) {
      List<Event> taskEvents = taskService.getTaskEvents(taskId);
      Event taskEvent = findTaskEvent(taskEvents, Event.ACTION_DELETE_GROUP_LINK);
      assertEquals(Event.ACTION_DELETE_GROUP_LINK, taskEvent.getAction());
      List<String> taskEventMessageParts = taskEvent.getMessageParts();
      assertEquals("muppets", taskEventMessageParts.get(0));
      assertEquals(IdentityLinkType.CANDIDATE, taskEventMessageParts.get(1));
      assertEquals(2, taskEventMessageParts.size());
      assertEquals(2, taskEvents.size());
    }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.task.Event

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.