Examples of active()


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

    managementService.activateJobByProcessDefinitionKey(processDefinition.getKey());

    // then
    // the job should be suspended
    assertEquals(0, jobQuery.suspended().count());
    assertEquals(1, jobQuery.active().count());

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

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

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

    // then
    // the job should be suspended
    assertEquals(0, jobQuery.suspended().count());
    assertEquals(1, jobQuery.active().count());

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

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

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

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

  }

  public void testQueryByActive() throws Exception {
    ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery();

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

    repositoryService.suspendProcessDefinitionByKey("oneTaskProcess");

    assertEquals(5, processInstanceQuery.active().count());
View Full Code Here

Examples of org.camunda.bpm.engine.task.TaskQuery.active()

    executeAvailableJobs();

    // if the waiting job is executed there should be 2 user tasks
    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(2, taskQuery.active().count());

    // finish tasks
    List<Task> tasks = taskQuery.active().list();
    for(Task task : tasks) {
      taskService.complete(task.getId());
View Full Code Here

Examples of org.camunda.bpm.engine.task.TaskQuery.active()

    // if the waiting job is executed there should be 2 user tasks
    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(2, taskQuery.active().count());

    // finish tasks
    List<Task> tasks = taskQuery.active().list();
    for(Task task : tasks) {
      taskService.complete(task.getId());
    }

    assertProcessEnded(pi.getProcessInstanceId());
View Full Code Here

Examples of org.camunda.bpm.engine.task.TaskQuery.active()

    executeAvailableJobs();

    // if the waiting job is executed there should be 2 user tasks
    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(1, taskQuery.active().count());

    // finish tasks
    List<Task> tasks = taskQuery.active().list();
    for(Task task : tasks) {
      taskService.complete(task.getId());
View Full Code Here

Examples of org.camunda.bpm.engine.task.TaskQuery.active()

    // if the waiting job is executed there should be 2 user tasks
    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(1, taskQuery.active().count());

    // finish tasks
    List<Task> tasks = taskQuery.active().list();
    for(Task task : tasks) {
      taskService.complete(task.getId());
    }

    assertProcessEnded(pi.getProcessInstanceId());
View Full Code Here

Examples of org.elasticsearch.cluster.routing.MutableShardRouting.active()

                    }
                } else {
                    // if its backup, see if there is a primary that *is* allocated, and try and assign a location that is closest to it
                    // note, since we replicate operations, this might not be the same (different flush intervals)
                    MutableShardRouting primaryShard = routingNodes.findPrimaryForReplica(shard);
                    if (primaryShard != null && primaryShard.active()) {
                        DiscoveryNode primaryNode = nodes.get(primaryShard.currentNodeId());
                        if (primaryNode != null) {
                            TransportNodesListShardStoreMetaData.StoreFilesMetaData primaryNodeStore = shardStores.get(primaryNode);
                            if (primaryNodeStore != null && primaryNodeStore.allocated()) {
                                long sizeMatched = 0;
View Full Code Here

Examples of org.elasticsearch.cluster.routing.ShardRouting.active()

                final ShardRouting shard = shardX;
                // we only deal with primary shardIt here...
                if (!shard.primary()) {
                    continue;
                }
                if (!shard.active() || !nodes.nodeExists(shard.currentNodeId())) {
                    retry(fromClusterEvent, shard.shardId());
                    return false;
                }

                // check here for consistency
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.