Package org.camunda.bpm.engine.runtime

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


    List<CaseInstance> caseInstances = new ArrayList<CaseInstance>();
    CaseInstance mockCaseInstance = MockProvider.createMockCaseInstance();
    caseInstances.add(mockCaseInstance);

    CaseInstanceQuery mockCaseInstanceQuery = mock(CaseInstanceQuery.class);
    when(mockCaseInstanceQuery.list()).thenReturn(caseInstances);
    when(mockCaseService.createCaseInstanceQuery()).thenReturn(mockCaseInstanceQuery);
  }

  private void createCaseExecutionMock() {
    List<CaseExecution> caseExecutions = new ArrayList<CaseExecution>();
View Full Code Here


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

    List<CaseInstanceDto> instanceResults = new ArrayList<CaseInstanceDto>();
    for (CaseInstance instance : matchingInstances) {
      CaseInstanceDto resultInstance = CaseInstanceDto.fromCaseInstance(instance);
View Full Code Here

  }

  private CaseInstanceQuery setUpMockCaseInstanceQuery(List<CaseInstance> mockedCaseInstances) {
    CaseInstanceQuery query = mock(CaseInstanceQuery.class);

    when(query.list()).thenReturn(mockedCaseInstances);
    when(query.count()).thenReturn((long) mockedCaseInstances.size());
    when(processEngine.getCaseService().createCaseInstanceQuery()).thenReturn(query);

    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.