Package org.camunda.bpm.engine.runtime

Examples of org.camunda.bpm.engine.runtime.CaseExecutionQuery.list()


    List<CaseExecution> caseExecutions = new ArrayList<CaseExecution>();
    CaseExecution mockCaseExecution = MockProvider.createMockCaseExecution();
    caseExecutions.add(mockCaseExecution);

    CaseExecutionQuery mockCaseExecutionQuery = mock(CaseExecutionQuery.class);
    when(mockCaseExecutionQuery.list()).thenReturn(caseExecutions);
    when(mockCaseService.createCaseExecutionQuery()).thenReturn(mockCaseExecutionQuery);
  }

  private void createProcessInstanceMock() {
    ProcessInstance mockInstance = MockProvider.createMockInstance();
View Full Code Here


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

    List<CaseExecutionDto> executionResults = new ArrayList<CaseExecutionDto>();
    for (CaseExecution execution : matchingExecutions) {
      CaseExecutionDto resultExecution = CaseExecutionDto.fromCaseExecution(execution);
View Full Code Here

      .createCaseExecutionQuery()
      .enabled();

    assertEquals(2, query.count());

    for (CaseExecution child : query.list()) {
      assertEquals(stageId, child.getParentId());
    }

  }
View Full Code Here

  private CaseExecutionQuery setUpMockCaseExecutionQuery(List<CaseExecution> mockedCaseExecutions) {
    CaseExecutionQuery query = mock(CaseExecutionQuery.class);

    when(processEngine.getCaseService().createCaseExecutionQuery()).thenReturn(query);

    when(query.list()).thenReturn(mockedCaseExecutions);
    when(query.count()).thenReturn((long) mockedCaseExecutions.size());

    return query;
  }
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.