Package org.camunda.bpm.engine.repository

Examples of org.camunda.bpm.engine.repository.ProcessDefinitionQuery


    List<Incident> incidentList = runtimeService.createIncidentQuery().list();
    assertEquals(1, incidentList.size());

    Incident incident = runtimeService.createIncidentQuery().processInstanceId(processInstance.getId()).singleResult();

    ProcessDefinitionQuery query = repositoryService
        .createProcessDefinitionQuery()
        .incidentType(incident.getIncidentType());

    verifyQueryResults(query, 1);
  }
View Full Code Here


    verifyQueryResults(query, 1);
  }

  public void testQueryByInvalidIncidentType() {
    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();

    verifyQueryResults(query.incidentType("invalid"), 0);

    try {
      query.incidentType(null);
      fail();
    } catch (ProcessEngineException e) {}
  }
View Full Code Here

    List<Incident> incidentList = runtimeService.createIncidentQuery().list();
    assertEquals(1, incidentList.size());

    Incident incident = runtimeService.createIncidentQuery().processInstanceId(processInstance.getId()).singleResult();

    ProcessDefinitionQuery query = repositoryService
        .createProcessDefinitionQuery()
        .incidentMessage(incident.getIncidentMessage());

    verifyQueryResults(query, 1);
  }
View Full Code Here

    verifyQueryResults(query, 1);
  }

  public void testQueryByInvalidIncidentMessage() {
    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();

    verifyQueryResults(query.incidentMessage("invalid"), 0);

    try {
      query.incidentMessage(null);
      fail();
    } catch (ProcessEngineException e) {}
  }
View Full Code Here

    executeAvailableJobs();

    List<Incident> incidentList = runtimeService.createIncidentQuery().list();
    assertEquals(1, incidentList.size());

    ProcessDefinitionQuery query = repositoryService
        .createProcessDefinitionQuery()
        .incidentMessageLike("%expected%");

    verifyQueryResults(query, 1);
  }
View Full Code Here

    verifyQueryResults(query, 1);
  }

  public void testQueryByInvalidIncidentMessageLike() {
    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();

    verifyQueryResults(query.incidentMessageLike("invalid"), 0);

    try {
      query.incidentMessageLike(null);
      fail();
    } catch (ProcessEngineException e) {}
  }
View Full Code Here

        .createDeployment()
        .addClasspathResource("org/camunda/bpm/engine/test/api/repository/first-process.bpmn20.xml")
        .deploy()
        .getId();

    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();

    query
      .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

        .createDeployment()
        .addClasspathResource("org/camunda/bpm/engine/test/api/repository/second-process.bpmn20.xml")
        .deploy()
        .getId();

    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();

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

    verifyQueryResults(query, 0);
View Full Code Here

        .createDeployment()
        .addClasspathResource("org/camunda/bpm/engine/test/api/repository/second-process.bpmn20.xml")
        .deploy()
        .getId();

    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();

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

    verifyQueryResults(query, 1);

    ProcessDefinition result = query.singleResult();

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

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

    verifyQueryResults(query, 1);

    result = query.singleResult();

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

    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

        .createDeployment()
        .addClasspathResource("org/camunda/bpm/engine/test/api/repository/second-process.bpmn20.xml")
        .deploy()
        .getId();

    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();

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

    verifyQueryResults(query, 0);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.repository.ProcessDefinitionQuery

Copyright © 2018 www.massapicom. 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.