use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class EDeploymentTest method testDuplicateDeploy.
@Test
public void testDuplicateDeploy() {
DeploymentUnit basicKieJar = archive.deployBasicKieJar();
try {
deploymentService.deploy(basicKieJar);
// An exception should be thrown
Assertions.assertThat(false).isTrue();
} catch (Exception ex) {
Assertions.assertThat(ex.getMessage()).contains(basicKieJar.getIdentifier() + " is already deployed");
}
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class EDeploymentTest method testDeploy.
@Test
public void testDeploy() throws Exception {
DeploymentUnit basicKieJar = archive.deployBasicKieJar();
DeployedUnit deployed = deploymentService.getDeployedUnit(basicKieJar.getIdentifier());
Assertions.assertThat(deployed).isNotNull();
Assertions.assertThat(deployed.getDeploymentUnit()).isNotNull();
Assertions.assertThat(deployed.getDeploymentUnit()).isEqualTo(basicKieJar);
Assertions.assertThat(deployed.getRuntimeManager()).isNotNull();
Collection<ProcessDefinition> processes = runtimeDataService.getProcesses(new QueryContext());
Assertions.assertThat(processes).isNotNull().isNotEmpty();
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class EJBService method deployEJBComplianceKieJar.
public DeploymentUnit deployEJBComplianceKieJar() {
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(KieJar.EJBCOMPL.groupId, KieJar.EJBCOMPL.artifactId, KieJar.EJBCOMPL.version);
List<String> assets = new ArrayList<String>();
assets.add("ThreadInfo.bpmn2");
assets.add("TxRules.drl");
assets.add("hello-world_1.0.bpmn");
deployKieJar(ks, releaseId, assets);
DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(KieJar.EJBCOMPL.getGroupId(), KieJar.EJBCOMPL.getArtifactId(), KieJar.EJBCOMPL.getVersion());
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
return deploymentUnit;
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class EJBService method deployVariableKieJar.
public DeploymentUnit deployVariableKieJar() {
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(KieJar.VARIABLE.groupId, KieJar.VARIABLE.artifactId, KieJar.VARIABLE.version);
List<String> assets = new ArrayList<String>();
assets.add("ObjectVariableProcess.bpmn2");
deployKieJar(ks, releaseId, assets);
DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(KieJar.VARIABLE.getGroupId(), KieJar.VARIABLE.getArtifactId(), KieJar.VARIABLE.getVersion());
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
return deploymentUnit;
}
use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.
the class EJBService method deployServiceKieJar.
public DeploymentUnit deployServiceKieJar() {
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(KieJar.SERVICE.groupId, KieJar.SERVICE.artifactId, KieJar.SERVICE.version);
List<String> assets = new ArrayList<String>();
assets.add("RestWorkItem.bpmn2");
deployKieJar(ks, releaseId, assets);
DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(KieJar.SERVICE.getGroupId(), KieJar.SERVICE.getArtifactId(), KieJar.SERVICE.getVersion());
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
return deploymentUnit;
}
Aggregations