Package org.camunda.bpm.engine.history

Examples of org.camunda.bpm.engine.history.HistoricTaskInstanceQuery.list()


  private void createHistoricTaskInstanceMock() {
    List<HistoricTaskInstance> tasks = MockProvider.createMockHistoricTaskInstances();

    HistoricTaskInstanceQuery query = mock(HistoricTaskInstanceQuery.class);
    when(mockHistoryService.createHistoricTaskInstanceQuery()).thenReturn(query);
    when(query.list()).thenReturn(tasks);
  }

  private void createHistoricIncidentMock() {
    HistoricIncidentQuery mockHistoricIncidentQuery = mock(HistoricIncidentQuery.class);
    List<HistoricIncident> historicIncidents = MockProvider.createMockHistoricIncidents();
View Full Code Here


    List<HistoricTaskInstance> match;
    if (firstResult != null || maxResults != null) {
      match = executePaginatedQuery(query, firstResult, maxResults);
    } else {
      match = query.list();
    }

    List<HistoricTaskInstanceDto> result = new ArrayList<HistoricTaskInstanceDto>();
    for (HistoricTaskInstance taskInstance : match) {
      HistoricTaskInstanceDto taskInstanceDto = HistoricTaskInstanceDto.fromHistoricTaskInstance(taskInstance);
View Full Code Here

    HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();

    query.caseDefinitionKey(key);

    assertEquals(1, query.count());
    assertEquals(1, query.list().size());
    assertNotNull(query.singleResult());

    HistoricTaskInstance task = query.singleResult();
    assertNotNull(task);
View Full Code Here

    HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();

    query.caseDefinitionKey("invalid");

    assertEquals(0, query.count());
    assertEquals(0, query.list().size());
    assertNull(query.singleResult());

    query.caseDefinitionKey(null);

    assertEquals(0, query.count());
View Full Code Here

    assertNull(query.singleResult());

    query.caseDefinitionKey(null);

    assertEquals(0, query.count());
    assertEquals(0, query.list().size());
    assertNull(query.singleResult());

  }

  @Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
View Full Code Here

    HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();

    query.caseDefinitionName(caseDefinitionName);

    assertEquals(1, query.count());
    assertEquals(1, query.list().size());
    assertNotNull(query.singleResult());

    HistoricTaskInstance task = query.singleResult();
    assertNotNull(task);
View Full Code Here

    HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();

    query.caseDefinitionName("invalid");

    assertEquals(0, query.count());
    assertEquals(0, query.list().size());
    assertNull(query.singleResult());

    query.caseDefinitionName(null);

    assertEquals(0, query.count());
View Full Code Here

    assertNull(query.singleResult());

    query.caseDefinitionName(null);

    assertEquals(0, query.count());
    assertEquals(0, query.list().size());
    assertNull(query.singleResult());

  }

  @Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
View Full Code Here

    HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();

    query.caseInstanceId(caseInstanceId);

    assertEquals(1, query.count());
    assertEquals(1, query.list().size());
    assertNotNull(query.singleResult());

    HistoricTaskInstance task = query.singleResult();
    assertNotNull(task);
View Full Code Here

    HistoricTaskInstanceQuery query = historyService.createHistoricTaskInstanceQuery();

    query.caseInstanceId(caseInstanceId);

    assertEquals(2, query.count());
    assertEquals(2, query.list().size());

    for (HistoricTaskInstance task : query.list()) {
      assertEquals(caseInstanceId, task.getCaseInstanceId());

      assertNull(task.getCaseDefinitionId());
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.