use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class ProcessServiceImplWithDeploymentIdTest method cleanup.
@After
public void cleanup() {
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 ProcessServiceImplWithoutAuditTest method cleanup.
@After
public void cleanup() {
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 RuntimeDataServiceImplSecurityTest 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();
CountDownListenerFactory.clear();
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class FilteredKModuleDeploymentServiceTest method cleanup.
@After
public void cleanup() {
cleanupSingletonSessionId();
if (units != null && !units.isEmpty()) {
for (DeploymentUnit unit : units) {
deploymentService.undeploy(unit);
}
units.clear();
}
close();
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class FilteredKModuleDeploymentServiceTest method testDeploymentOfProcessesWildcardPackage.
@Test
public void testDeploymentOfProcessesWildcardPackage() {
prepare("customer.*");
assertNotNull(deploymentService);
DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION, "KBase-test", "ksession-test");
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
DeployedUnit deployed = deploymentService.getDeployedUnit(deploymentUnit.getIdentifier());
assertNotNull(deployed);
assertNotNull(deployed.getDeploymentUnit());
assertNotNull(deployed.getRuntimeManager());
assertEquals(GROUP_ID + ":" + ARTIFACT_ID + ":" + VERSION + ":" + "KBase-test" + ":" + "ksession-test", deployed.getDeploymentUnit().getIdentifier());
assertNotNull(runtimeDataService);
Collection<ProcessDefinition> processes = runtimeDataService.getProcesses(new QueryContext());
assertNotNull(processes);
assertEquals(2, processes.size());
processes = runtimeDataService.getProcessesByFilter("custom", new QueryContext());
assertNotNull(processes);
assertEquals(1, processes.size());
processes = runtimeDataService.getProcessesByDeploymentId(deploymentUnit.getIdentifier(), new QueryContext());
assertNotNull(processes);
assertEquals(2, processes.size());
ProcessDefinition process = runtimeDataService.getProcessesByDeploymentIdProcessId(deploymentUnit.getIdentifier(), "customtask");
assertNotNull(process);
}
Aggregations