Examples of singleResult()


Examples of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartQueryImpl.singleResult()

    CaseExecution thirdHumanTask = queryCaseExecutionByActivityId("PI_HumanTask_3");
    String thirdHumanTaskId = thirdHumanTask.getId();
    assertTrue(thirdHumanTask.isAvailable());

    CaseSentryPartQueryImpl query = createCaseSentryPartQuery();
    CmmnSentryPart part = query.singleResult();
    assertFalse(part.isSatisfied());

    // when
    manualStart(firstHumanTaskId);
    complete(firstHumanTaskId);
View Full Code Here

Examples of org.camunda.bpm.engine.management.JobDefinitionQuery.singleResult()

    JobDefinitionQuery query = managementService.createJobDefinitionQuery().jobDefinitionId(jobDefinition.getId());

    verifyQueryResults(query, 1);

    assertEquals(jobDefinition.getId(), query.singleResult().getId());
  }

  @Deployment(resources = {"org/camunda/bpm/engine/test/api/mgmt/JobDefinitionQueryTest.testBase.bpmn"})
  public void testQueryByInvalidJobDefinitionId() {
    JobDefinitionQuery query = managementService.createJobDefinitionQuery().jobDefinitionId("invalid");
View Full Code Here

Examples of org.camunda.bpm.engine.repository.CaseDefinitionQuery.singleResult()

    // there should be one case definition
    CaseDefinitionQuery query = engine.getRepositoryService().createCaseDefinitionQuery();
    assertEquals(1, query.count());

    CaseDefinition caseDefinition = query.singleResult();
    assertEquals("Case_1", caseDefinition.getKey());

    engine.getRepositoryService().deleteDeployment(deploymentId);
  }
View Full Code Here

Examples of org.camunda.bpm.engine.repository.DeploymentQuery.singleResult()

  private void createDeploymentMock() {
    Deployment mockDeployment = MockProvider.createMockDeployment();

    DeploymentQuery deploymentQueryMock = mock(DeploymentQuery.class);
    when(deploymentQueryMock.deploymentId(anyString())).thenReturn(deploymentQueryMock);
    when(deploymentQueryMock.singleResult()).thenReturn(mockDeployment);

    when(mockRepoService.createDeploymentQuery()).thenReturn(deploymentQueryMock);
  }

  private void createFilterMock() {
View Full Code Here

Examples of org.camunda.bpm.engine.repository.ProcessDefinitionQuery.singleResult()

      .processDefinitionName("First Test Process")
      .latestVersion();

    verifyQueryResults(query, 1);

    ProcessDefinition result = query.singleResult();

    assertEquals("First Test Process", result.getName());
    assertEquals(2, result.getVersion());

    repositoryService.deleteDeployment(firstDeployment, true);
View Full Code Here

Examples of org.camunda.bpm.engine.repository.ProcessDefinitionQuery.singleResult()

      .processDefinitionNameLike("%Test Process")
      .latestVersion();

    verifyQueryResults(query, 1);

    ProcessDefinition result = query.singleResult();

    assertEquals("Second Test Process", result.getName());
    assertEquals(2, result.getVersion());

    query
View Full Code Here

Examples of org.camunda.bpm.engine.repository.ProcessDefinitionQuery.singleResult()

      .processDefinitionNameLike("%Test%")
      .latestVersion();

    verifyQueryResults(query, 1);

    result = query.singleResult();

    assertEquals("Second Test Process", result.getName());
    assertEquals(2, result.getVersion());

    query
View Full Code Here

Examples of org.camunda.bpm.engine.repository.ProcessDefinitionQuery.singleResult()

    query
      .processDefinitionNameLike("Second%")
      .latestVersion();

    result = query.singleResult();

    assertEquals("Second Test Process", result.getName());
    assertEquals(2, result.getVersion());

    repositoryService.deleteDeployment(firstDeployment, true);
View Full Code Here

Examples of org.camunda.bpm.engine.runtime.CaseExecutionQuery.singleResult()

      .manualStart();

    // then

    // the child case execution is active...
    CaseExecution caseExecution = caseExecutionQuery.singleResult();
    assertTrue(caseExecution.isActive());
    // ... and not enabled
    assertFalse(caseExecution.isEnabled());

    // there exists a task
View Full Code Here

Examples of org.camunda.bpm.engine.runtime.EventSubscriptionQuery.singleResult()

    EventSubscriptionQuery query = runtimeService.createEventSubscriptionQuery()
        .eventSubscriptionId(eventSubscription.getId());

    assertEquals(1, query.count());
    assertEquals(1, query.list().size());
    assertNotNull(query.singleResult());

    try {
      runtimeService.createEventSubscriptionQuery().eventSubscriptionId(null).list();
      fail("Expected ProcessEngineException");
    } catch (ProcessEngineException e) {
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.