Package org.camunda.bpm.engine.runtime

Examples of org.camunda.bpm.engine.runtime.CaseExecution


    caseService.manuallyStartCaseExecution(caseExecutionId);

    // then

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

    // there exists a task
    Task task = taskService
      .createTaskQuery()
      .caseExecutionId(caseExecutionId)
View Full Code Here


    caseService.manuallyStartCaseExecution(caseExecutionId, variables);

    // then

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

    // there exists a task
    Task task = taskService
      .createTaskQuery()
      .caseExecutionId(caseExecutionId)
View Full Code Here

    // when
    caseService.disableCaseExecution(caseExecutionId);

    // then
    CaseExecution caseExecution = caseExecutionQuery.singleResult();
    // the human task is disabled
    assertTrue(caseExecution.isDisabled());
    assertFalse(caseExecution.isActive());
    assertFalse(caseExecution.isEnabled());
  }
View Full Code Here

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("aVariable", "aValue");
    caseService.disableCaseExecution(caseExecutionId, variables);

    // then
    CaseExecution caseExecution = caseExecutionQuery.singleResult();
    // the human task is disabled
    assertTrue(caseExecution.isDisabled());
    assertFalse(caseExecution.isActive());
    assertFalse(caseExecution.isEnabled());

    // there is a variable set on the case instance
    VariableInstance variable = runtimeService.createVariableInstanceQuery().singleResult();

    assertNotNull(variable);
View Full Code Here

    // when
    caseService.reenableCaseExecution(caseExecutionId);

    // then
    CaseExecution caseExecution = caseExecutionQuery.singleResult();
    // the human task is disabled
    assertFalse(caseExecution.isDisabled());
    assertFalse(caseExecution.isActive());
    assertTrue(caseExecution.isEnabled());

  }
View Full Code Here

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("aVariable", "aValue");
    caseService.reenableCaseExecution(caseExecutionId, variables);

    // then
    CaseExecution caseExecution = caseExecutionQuery.singleResult();
    // the human task is disabled
    assertFalse(caseExecution.isDisabled());
    assertFalse(caseExecution.isActive());
    assertTrue(caseExecution.isEnabled());

    // there is a variable set on the case instance
    VariableInstance variable = runtimeService.createVariableInstanceQuery().singleResult();

    assertNotNull(variable);
View Full Code Here

    assertNull(task);

    // the corresponding case execution has been also
    // deleted and completed
    CaseExecution caseExecution = caseService
        .createCaseExecutionQuery()
        .activityId("PI_HumanTask_1")
        .singleResult();

    assertNull(caseExecution);
View Full Code Here

    // the task has been completed and has been deleted
    assertNull(taskService.createTaskQuery().singleResult());

    // the corresponding case execution has been also
    // deleted and completed
    CaseExecution caseExecution = caseService
        .createCaseExecutionQuery()
        .activityId("PI_HumanTask_1")
        .singleResult();

    assertNull(caseExecution);
View Full Code Here

    task = taskService.createTaskQuery().singleResult();

    assertNull(task);

    CaseExecution caseExecution = caseService
      .createCaseExecutionQuery()
      .activityId("PI_HumanTask_1")
      .singleResult();

    assertNull(caseExecution);
View Full Code Here

  @Deployment(resources = {"org/camunda/bpm/engine/test/cmmn/sentry/SentryExitCriteriaTest.testExitDisabledTask.cmmn"})
  public void testExitDisabledTask() {
    // given
    createCaseInstance();

    CaseExecution firstHumanTask = queryCaseExecutionByActivityId("PI_HumanTask_1");
    String firstHumanTaskId = firstHumanTask.getId();

    assertTrue(firstHumanTask.isEnabled());

    CaseExecution secondHumanTask = queryCaseExecutionByActivityId("PI_HumanTask_2");
    String secondHumanTaskId = secondHumanTask.getId();

    assertTrue(secondHumanTask.isEnabled());

    disable(secondHumanTaskId);

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

TOP

Related Classes of org.camunda.bpm.engine.runtime.CaseExecution

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.