Package org.camunda.bpm.engine.impl.cmmn.entity.runtime

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


      .singleResult();
  }

  protected CaseSentryPartQueryImpl createCaseSentryPartQuery() {
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequiresNew();
    return new CaseSentryPartQueryImpl(commandExecutor);
  }
View Full Code Here


    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);

    // then
    secondHumanTask = queryCaseExecutionById(secondHumanTaskId);
    assertTrue(secondHumanTask.isEnabled());

    thirdHumanTask = queryCaseExecutionById(thirdHumanTaskId);
    assertTrue(thirdHumanTask.isEnabled());

    part = query
        .satisfied()
        .singleResult();
    assertNotNull(part);
    assertTrue(part.isSatisfied());
  }
View Full Code Here

        .createCaseExecutionQuery()
        .activityId("PI_HumanTask_1")
        .singleResult()
        .getId();

    CaseSentryPartQueryImpl query = createCaseSentryPartQuery();

    assertEquals(2, query.count());

    CaseSentryPartEntity part = query
        .type(CmmnSentryDeclaration.IF_PART)
        .singleResult();

    assertEquals(caseInstanceId, part.getCaseExecutionId());
    assertEquals(caseInstanceId, part.getCaseInstanceId());
    assertEquals("Sentry_1", part.getSentryId());
    assertEquals(CmmnSentryDeclaration.IF_PART, part.getType());
    assertNull(part.getSourceCaseExecutionId());
    assertNull(part.getStandardEvent());
    assertFalse(part.isSatisfied());

    part = query
        .type(CmmnSentryDeclaration.PLAN_ITEM_ON_PART)
        .singleResult();

    assertEquals(caseInstanceId, part.getCaseExecutionId());
    assertEquals(caseInstanceId, part.getCaseInstanceId());
View Full Code Here

        .createCaseExecutionQuery()
        .activityId("PI_HumanTask_1")
        .singleResult()
        .getId();

    CaseSentryPartQueryImpl query = createCaseSentryPartQuery();

    assertEquals(2, query.count());

    CaseSentryPartEntity part = query
        .sentryId("Sentry_1")
        .singleResult();

    assertEquals(caseInstanceId, part.getCaseExecutionId());
    assertEquals(caseInstanceId, part.getCaseInstanceId());
    assertEquals("Sentry_1", part.getSentryId());
    assertEquals(CmmnSentryDeclaration.IF_PART, part.getType());
    assertNull(part.getSourceCaseExecutionId());
    assertNull(part.getStandardEvent());
    assertFalse(part.isSatisfied());

    part = query
        .sentryId("Sentry_2")
        .singleResult();

    assertEquals(caseInstanceId, part.getCaseExecutionId());
    assertEquals(caseInstanceId, part.getCaseInstanceId());
View Full Code Here

        .setVariable("myVar", 0)
        .create()
        .getId();

    // then
    CaseSentryPartQueryImpl query = createCaseSentryPartQuery();

    assertEquals(0, query.count());

    // when
    String stageId = caseService
        .createCaseExecutionQuery()
        .activityId("PI_Stage_1")
        .singleResult()
        .getId();

    caseService
      .withCaseExecution(stageId)
      .manualStart();

    // then
    String humanTaskId = caseService
        .createCaseExecutionQuery()
        .activityId("PI_HumanTask_1")
        .singleResult()
        .getId();

    assertEquals(2, query.count());

    CaseSentryPartEntity part = query
        .sentryId("Sentry_1")
        .singleResult();

    assertEquals(caseInstanceId, part.getCaseInstanceId());
    assertEquals(stageId, part.getCaseExecutionId());
    assertEquals("Sentry_1", part.getSentryId());
    assertEquals(CmmnSentryDeclaration.IF_PART, part.getType());
    assertNull(part.getSourceCaseExecutionId());
    assertNull(part.getStandardEvent());
    assertFalse(part.isSatisfied());

    part = query
        .sentryId("Sentry_2")
        .singleResult();

    assertEquals(caseInstanceId, part.getCaseInstanceId());
    assertEquals(stageId, part.getCaseExecutionId());
View Full Code Here

  public CaseExecutionQuery createCaseExecutionQuery() {
    return new CaseExecutionQueryImpl(commandExecutor);
  }

  public CaseSentryPartQuery createCaseSentryPartQuery() {
    return new CaseSentryPartQueryImpl(commandExecutor);
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseSentryPartQueryImpl

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.