use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testEndTerminateEventCancelWithSubprocess.
@Deployment
public void testEndTerminateEventCancelWithSubprocess() {
ProcessInstance processInstance = startProcess();
runtimeService.correlateMessage("continue");
assertProcessEnded(processInstance.getId());
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertIsCanceledActivityInstances(allInstances, "subprocess", 1);
assertNonCompletingActivityInstance(allInstances, "subprocess");
assertIsCanceledActivityInstances(allInstances, "userTask", 1);
assertNonCompletingActivityInstance(allInstances, "userTask");
assertNonCanceledActivityInstance(allInstances, "terminateEnd");
assertIsCompletingActivityInstances(allInstances, "terminateEnd", 1);
}
use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testEventSubprocessErrorCancel.
@Deployment
public void testEventSubprocessErrorCancel() {
ProcessInstance processInstance = startProcess();
runtimeService.correlateMessage("continue");
assertProcessEnded(processInstance.getId());
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertIsCanceledActivityInstances(allInstances, "userTask", 1);
assertNonCompletingActivityInstance(allInstances, "userTask");
assertIsCanceledActivityInstances(allInstances, "errorEnd", 1);
assertNonCompletingActivityInstance(allInstances, "errorEnd");
assertNonCanceledActivityInstance(allInstances, "eventSubprocessStart");
assertNonCompletingActivityInstance(allInstances, "eventSubprocessStart");
assertNonCanceledActivityInstance(allInstances, "eventSubprocessEnd");
assertIsCompletingActivityInstances(allInstances, "eventSubprocessEnd", 1);
}
use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricActivityInstanceStateTest method testBoundaryErrorCancel.
@Deployment
public void testBoundaryErrorCancel() {
ProcessInstance processInstance = startProcess();
runtimeService.correlateMessage("continue");
assertProcessEnded(processInstance.getId());
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertNonCanceledActivityInstance(allInstances, "start");
assertNonCompletingActivityInstance(allInstances, "start");
assertNonCanceledActivityInstance(allInstances, "subprocessStart");
assertNonCompletingActivityInstance(allInstances, "subprocessStart");
assertNonCanceledActivityInstance(allInstances, "gtw");
assertNonCompletingActivityInstance(allInstances, "gtw");
assertIsCanceledActivityInstances(allInstances, "subprocess", 1);
assertNonCompletingActivityInstance(allInstances, "subprocess");
assertIsCanceledActivityInstances(allInstances, "errorSubprocessEnd", 1);
assertNonCompletingActivityInstance(allInstances, "errorSubprocessEnd");
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 testCancelProcessWithParallelGateway.
@Deployment
public void testCancelProcessWithParallelGateway() {
ProcessInstance processInstance = startProcess();
runtimeService.deleteProcessInstance(processInstance.getId(), "test");
List<HistoricActivityInstance> allInstances = getAllActivityInstances();
assertIsCanceledActivityInstances(allInstances, "userTask1", 1);
assertNonCompletingActivityInstance(allInstances, "userTask1");
assertIsCanceledActivityInstances(allInstances, "userTask2", 1);
assertNonCompletingActivityInstance(allInstances, "userTask2");
assertIsCanceledActivityInstances(allInstances, "subprocess", 1);
assertNonCompletingActivityInstance(allInstances, "subprocess");
}
use of org.camunda.bpm.engine.history.HistoricActivityInstance in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceScopeTest method testSetVariableLocalOnServiceTaskInsideParallelBranch.
@Deployment
public void testSetVariableLocalOnServiceTaskInsideParallelBranch() {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("process");
HistoricActivityInstance serviceTask = historyService.createHistoricActivityInstanceQuery().activityId("serviceTask1").singleResult();
assertNotNull(serviceTask);
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery();
assertEquals(1, query.count());
HistoricVariableInstance variable = query.singleResult();
// the variable is in the service task scope
assertEquals(serviceTask.getId(), variable.getActivityInstanceId());
assertProcessEnded(pi.getId());
}
Aggregations