Package org.camunda.bpm.engine.runtime

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


    // then
    // the job should be activated
    JobQuery jobQuery = managementService.createJobQuery();

    assertEquals(0, jobQuery.suspended().count());
    assertEquals(3, jobQuery.active().count());

    // Clean DB
    for (org.camunda.bpm.engine.repository.Deployment deployment : repositoryService.createDeploymentQuery().list()) {
      repositoryService.deleteDeployment(deployment.getId(), true);
    }
View Full Code Here


    assertEquals(jobDefinition.getId(), suspendedJobDefinition.getId());
    assertTrue(suspendedJobDefinition.isSuspended());

    // the job is still active
    assertEquals(0, jobQuery.suspended().count());
    assertEquals(1, jobQuery.active().count());

    Job job = jobQuery.active().singleResult();

    assertEquals(jobDefinition.getId(), job.getJobDefinitionId());
    assertFalse(job.isSuspended());
View Full Code Here

    // the job is still active
    assertEquals(0, jobQuery.suspended().count());
    assertEquals(1, jobQuery.active().count());

    Job job = jobQuery.active().singleResult();

    assertEquals(jobDefinition.getId(), job.getJobDefinitionId());
    assertFalse(job.isSuspended());
  }
View Full Code Here

    // the job is still active
    JobQuery jobQuery = managementService.createJobQuery();

    assertEquals(0, jobQuery.suspended().count());
    assertEquals(2, jobQuery.active().count()); // there exists two jobs, a failing job and a timer job

    // when
    // execute job
    managementService.executeJob(timerToSuspendProcessDefinition.getId());
View Full Code Here

    assertEquals(jobDefinition.getId(), suspendedJobDefinition.getId());
    assertTrue(suspendedJobDefinition.isSuspended());

    // the job is still active
    assertEquals(0, jobQuery.active().count());
    assertEquals(1, jobQuery.suspended().count());

    Job job = jobQuery.suspended().singleResult();

    assertEquals(jobDefinition.getId(), job.getJobDefinitionId());
View Full Code Here

    // the job is still active
    JobQuery jobQuery = managementService.createJobQuery();

    assertEquals(0, jobQuery.suspended().count());
    assertEquals(2, jobQuery.active().count()); // there exists two jobs, a failing job and a timer job

    // when
    // execute job
    managementService.executeJob(timerToSuspendProcessDefinition.getId());
View Full Code Here

    assertEquals(jobDefinition.getId(), suspendedJobDefinition.getId());
    assertTrue(suspendedJobDefinition.isSuspended());

    // the job is still active
    assertEquals(0, jobQuery.active().count());
    assertEquals(1, jobQuery.suspended().count());

    Job job = jobQuery.suspended().singleResult();

    assertEquals(jobDefinition.getId(), job.getJobDefinitionId());
View Full Code Here

    // ...and the corresponding jobs should be still active
    JobQuery jobQuery = managementService.createJobQuery();

    assertEquals(0, jobQuery.suspended().count());
    assertEquals(5, jobQuery.active().count());

    // Clean DB
    for (org.camunda.bpm.engine.repository.Deployment deployment : repositoryService.createDeploymentQuery().list()) {
      repositoryService.deleteDeployment(deployment.getId(), true);
    }
View Full Code Here

    // ...and the corresponding jobs should be still active
    JobQuery jobQuery = managementService.createJobQuery();

    assertEquals(0, jobQuery.suspended().count());
    assertEquals(5, jobQuery.active().count());

    // Clean DB
    for (org.camunda.bpm.engine.repository.Deployment deployment : repositoryService.createDeploymentQuery().list()) {
      repositoryService.deleteDeployment(deployment.getId(), true);
    }
View Full Code Here

    assertEquals(5, jobDefinitionQuery.suspended().count());

    // ...and the corresponding jobs should be suspended too
    JobQuery jobQuery = managementService.createJobQuery();

    assertEquals(0, jobQuery.active().count());
    assertEquals(5, jobQuery.suspended().count());

    // Clean DB
    for (org.camunda.bpm.engine.repository.Deployment deployment : repositoryService.createDeploymentQuery().list()) {
      repositoryService.deleteDeployment(deployment.getId(), true);
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.