Package org.camunda.bpm.engine.runtime

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


    assertEquals(jobDefinition.getId(), activatedJobDefinition.getId());
    assertFalse(activatedJobDefinition.isSuspended());

    // the job is activated too
    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 activated too
    assertEquals(0, jobQuery.suspended().count());
    assertEquals(1, jobQuery.active().count());

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

    assertEquals(jobDefinition.getId(), job.getJobDefinitionId());
    assertFalse(job.isSuspended());

    // db cleanup
View Full Code Here

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

    // ...and the corresponding jobs should be still suspended
    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

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

    // ...and the corresponding jobs should still suspended
    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

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

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

    assertEquals(5, jobQuery.active().count());
    assertEquals(0, 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

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

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

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

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

    // ...and the corresponding jobs should be still suspended
    assertEquals(5, jobQuery.suspended().count());
    assertEquals(0, 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

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

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

    Job activeJob = jobQuery.active().singleResult();
    assertEquals(jobDefinition.getId(), activeJob.getJobDefinitionId());

    assertFalse(activeJob.isSuspended());
View Full Code Here

    JobQuery jobQuery = managementService.createJobQuery();

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

    Job activeJob = jobQuery.active().singleResult();
    assertEquals(jobDefinition.getId(), activeJob.getJobDefinitionId());

    assertFalse(activeJob.isSuspended());
  }
View Full Code Here

    assertTrue(suspendedJobDefinition.isSuspended());

    // the corresponding job is suspended
    jobQuery = managementService.createJobQuery();

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

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

    assertEquals(jobDefinition.getId(), suspendedJob.getJobDefinitionId());
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.