Package org.camunda.bpm.engine.runtime

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


    assertEquals(2, taskQuery.count());

    JobQuery jobQuery = managementService.createJobQuery();
    assertEquals(2, jobQuery.count());
    // execute timer job
    for (Job job : jobQuery.list()) {
      managementService.executeJob(job.getId());

      assertEquals(true, DummyServiceTask.wasExecuted);
      DummyServiceTask.wasExecuted = false;
    }
View Full Code Here


    assertEquals(2, taskQuery.count());

    JobQuery jobQuery = managementService.createJobQuery();
    assertEquals(2, jobQuery.count());
    // execute all timer jobs
    for (Job job : jobQuery.list()) {
      managementService.executeJob(job.getId());

      assertEquals(true, DummyServiceTask.wasExecuted);
      DummyServiceTask.wasExecuted = false;
    }
View Full Code Here

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

    List<JobDto> jobResults = new ArrayList<JobDto>();
    for (Job job : matchingJobs) {
      JobDto resultJob = JobDto.fromJob(job);
View Full Code Here

  }

  private JobQuery setUpMockJobQuery(List<Job> mockedJobs) {
    JobQuery sampleJobQuery = mock(JobQuery.class);

    when(sampleJobQuery.list()).thenReturn(mockedJobs);
    when(sampleJobQuery.count()).thenReturn((long) mockedJobs.size());

    when(processEngine.getManagementService().createJobQuery()).thenReturn(sampleJobQuery);

    return sampleJobQuery;
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.