Java Code Examples for org.camunda.bpm.engine.runtime.JobQuery#count()

The following examples show how to use org.camunda.bpm.engine.runtime.JobQuery#count() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProcessIntegrationTest.java    From camunda-bpm-mail with Apache License 2.0 5 votes vote down vote up
private void waitForAsyncJobs() throws InterruptedException {
  JobQuery jobQuery = engineRule.getManagementService().createJobQuery().executable();

  while(jobQuery.count() > 0) {
    Thread.sleep(500);
  }
}
 
Example 2
Source File: ProcessIntegrationTest.java    From camunda-bpm-mail with Apache License 2.0 5 votes vote down vote up
private void waitForAsyncJobs() throws InterruptedException {
  JobQuery jobQuery = engineRule.getManagementService().createJobQuery().executable();

  while(jobQuery.count() > 0) {
    Thread.sleep(500);
  }
}
 
Example 3
Source File: JobRestServiceImpl.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Override
public CountResultDto queryJobsCount(JobQueryDto queryDto) {
  ProcessEngine engine = getProcessEngine();
  queryDto.setObjectMapper(getObjectMapper());
  JobQuery query = queryDto.toQuery(engine);

  long count = query.count();
  CountResultDto result = new CountResultDto();
  result.setCount(count);

  return result;
}