use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class RuntimeDataServiceImplTest method cleanup.
@After
public void cleanup() {
if (processInstanceId != null) {
try {
// let's abort process instance to leave the system in clear state
processService.abortProcessInstance(processInstanceId);
ProcessInstance pi = processService.getProcessInstance(processInstanceId);
assertNull(pi);
} catch (ProcessInstanceNotFoundException e) {
// ignore it as it was already completed/aborted
}
}
cleanupSingletonSessionId();
if (units != null && !units.isEmpty()) {
for (DeploymentUnit unit : units) {
try {
deploymentService.undeploy(unit);
} catch (Exception e) {
// do nothing in case of some failed tests to avoid next test to fail as well
}
}
units.clear();
}
close();
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class TaskQueryBuilderTest method cleanup.
@After
public void cleanup() {
if (query != null) {
try {
queryService.unregisterQuery(query.getName());
} catch (QueryNotFoundException e) {
}
}
if (pids != null) {
for (int i = 0; i < pids.length; ++i) {
try {
// let's abort process instance to leave the system in clear
// state
long pid = pids[i];
processService.abortProcessInstance(pid);
ProcessInstance pi = processService.getProcessInstance(pid);
assertNull(pi);
} catch (ProcessInstanceNotFoundException e) {
// ignore it as it was already completed/aborted
}
}
pids = null;
}
cleanupSingletonSessionId();
if (units != null && !units.isEmpty()) {
for (DeploymentUnit unit : units) {
try {
deploymentService.undeploy(unit);
} catch (Exception e) {
// do nothing in case of some failed tests to avoid next
// test to fail as well
}
}
units.clear();
}
close();
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class TxUserTaskServiceImplTest method cleanup.
@After
public void cleanup() {
if (processInstanceId != null) {
try {
// let's abort process instance to leave the system in clear state
processService.abortProcessInstance(processInstanceId);
ProcessInstance pi = processService.getProcessInstance(processInstanceId);
assertNull(pi);
} catch (ProcessInstanceNotFoundException e) {
// ignore it as it might already be completed/aborted
}
}
cleanupSingletonSessionId();
if (units != null && !units.isEmpty()) {
for (DeploymentUnit unit : units) {
try {
deploymentService.undeploy(unit);
} catch (Exception e) {
// do nothing in case of some failed tests to avoid next test to fail as well
}
}
units.clear();
}
close();
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class UserTaskInstanceWithPotOwnerTest method cleanup.
@After
public void cleanup() {
System.clearProperty("org.jbpm.ht.callback");
System.clearProperty("org.jbpm.ht.custom.callback");
if (query != null) {
try {
queryService.unregisterQuery(query.getName());
} catch (QueryNotFoundException e) {
}
}
if (processInstanceId != null) {
try {
// let's abort process instance to leave the system in clear state
processService.abortProcessInstance(processInstanceId);
ProcessInstance pi = processService.getProcessInstance(processInstanceId);
assertNull(pi);
} catch (ProcessInstanceNotFoundException e) {
// ignore it as it was already completed/aborted
}
}
cleanupSingletonSessionId();
if (units != null && !units.isEmpty()) {
for (DeploymentUnit unit : units) {
try {
deploymentService.undeploy(unit);
} catch (Exception e) {
// do nothing in case of some failed tests to avoid next test to fail as well
}
}
units.clear();
}
close();
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class UserTaskServiceImplTest method cleanup.
@After
public void cleanup() {
if (processInstanceId != null) {
try {
// let's abort process instance to leave the system in clear state
processService.abortProcessInstance(processInstanceId);
ProcessInstance pi = processService.getProcessInstance(processInstanceId);
assertNull(pi);
} catch (ProcessInstanceNotFoundException e) {
// ignore it as it might already be completed/aborted
}
}
cleanupSingletonSessionId();
if (units != null && !units.isEmpty()) {
for (DeploymentUnit unit : units) {
try {
deploymentService.undeploy(unit);
} catch (Exception e) {
// do nothing in case of some failed tests to avoid next test to fail as well
}
}
units.clear();
}
close();
}
Aggregations