Package org.camunda.bpm.engine.repository

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


  public void testQueryByKey() {
    CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();

    // case one
    query
      .caseDefinitionKey("one");

    verifyQueryResults(query, 2);

    // case two
View Full Code Here


      .caseDefinitionKey("one");

    verifyQueryResults(query, 2);

    // case two
    query
      .caseDefinitionKey("two");

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

  }

  public void testQueryByInvalidKey() {
    CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();

    query
      .caseDefinitionKey("invalid");

    verifyQueryResults(query, 0);

    try {
View Full Code Here

      .caseDefinitionKey("invalid");

    verifyQueryResults(query, 0);

    try {
      query.caseDefinitionKey(null);
      fail();
    } catch (NotValidException e) {}
  }

  public void testQueryByKeyLike() {
View Full Code Here

    query
      .latestVersion();

    verifyQueryResults(query, 2);

    query
      .caseDefinitionKey("one")
      .latestVersion();

    verifyQueryResults(query, 1);
View Full Code Here

      .caseDefinitionKey("one")
      .latestVersion();

    verifyQueryResults(query, 1);

    query
      .caseDefinitionKey("two").latestVersion();
    verifyQueryResults(query, 1);
  }

  public void testInvalidUsageOfLatest() {
View Full Code Here

    ProcessEngine engine = getProcessEngine();
    RepositoryService repositoryService = engine.getRepositoryService();
    CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();

    query
      .caseDefinitionKey(caseDefinitionKey)
      .latestVersion();

    CaseDefinition caseDefinition = query.singleResult();
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.