use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testCancelProcessInstanceInUserTask.
@Deployment
public void testCancelProcessInstanceInUserTask() {
ProcessInstance processInstance = startProcess();
runtimeService.deleteProcessInstance(processInstance.getId(), "test");
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertIsCanceledActivityInstances(allInstances, "userTask", 1);
assertNonCompletingActivityInstance(allInstances, "userTask");
}
use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testEndTerminateEventCancelInSubprocess.
@Deployment
public void testEndTerminateEventCancelInSubprocess() {
ProcessInstance processInstance = startProcess();
runtimeService.correlateMessage("continue");
assertProcessEnded(processInstance.getId());
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertNonCompletingActivityInstance(allInstances, "subprocess");
assertNonCanceledActivityInstance(allInstances, "subprocess");
assertIsCanceledActivityInstances(allInstances, "userTask", 1);
assertNonCompletingActivityInstance(allInstances, "userTask");
assertNonCanceledActivityInstance(allInstances, "terminateEnd");
assertIsCompletingActivityInstances(allInstances, "terminateEnd", 1);
assertIsCompletingActivityInstances(allInstances, "end", 1);
assertNonCanceledActivityInstance(allInstances, "end");
}
use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testCancelProcessInstanceInSubprocess.
@Deployment
public void testCancelProcessInstanceInSubprocess() {
ProcessInstance processInstance = startProcess();
runtimeService.deleteProcessInstance(processInstance.getId(), "test");
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertIsCanceledActivityInstances(allInstances, "userTask", 1);
assertNonCompletingActivityInstance(allInstances, "userTask");
assertIsCanceledActivityInstances(allInstances, "subprocess", 1);
assertNonCompletingActivityInstance(allInstances, "subprocess");
}
use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testBoundarySignalCancel.
@Deployment
public void testBoundarySignalCancel() {
ProcessInstance processInstance = startProcess();
// should wait in user task
assertFalse(processInstance.isEnded());
// signal sub process
runtimeService.signalEventReceived("interrupt");
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertNonCompletingActivityInstance(allInstances, "subprocess");
assertIsCanceledActivityInstances(allInstances, "subprocess", 1);
assertIsCanceledActivityInstances(allInstances, "userTask", 1);
assertNonCompletingActivityInstance(allInstances, "userTask");
assertNonCanceledActivityInstance(allInstances, "subprocessBoundary");
assertNonCompletingActivityInstance(allInstances, "subprocessBoundary");
assertNonCanceledActivityInstance(allInstances, "endAfterBoundary");
assertIsCompletingActivityInstances(allInstances, "endAfterBoundary", 1);
}
use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testEndTerminateEventCancelWithCallActivity.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricActivityInstanceStateTest.testCancelProcessInstanceInUserTask.bpmn", "org/camunda/bpm/engine/test/history/HistoricActivityInstanceStateTest.testEndTerminateEventWithCallActivity.bpmn" })
public void testEndTerminateEventCancelWithCallActivity() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process1");
runtimeService.correlateMessage("continue");
assertProcessEnded(processInstance.getId());
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertIsCanceledActivityInstances(allInstances, "callActivity", 1);
assertNonCompletingActivityInstance(allInstances, "callActivity");
assertIsCanceledActivityInstances(allInstances, "userTask", 1);
assertNonCompletingActivityInstance(allInstances, "userTask");
assertNonCanceledActivityInstance(allInstances, "terminateEnd");
assertIsCompletingActivityInstances(allInstances, "terminateEnd", 1);
}
Aggregations