use of org.jbpm.kie.services.impl.KModuleDeploymentUnit in project jbpm by kiegroup.
the class AbstractCaseServicesBaseTest method prepareDeploymentUnit.
protected DeploymentUnit prepareDeploymentUnit() {
assertThat(deploymentService).isNotNull();
KModuleDeploymentUnit deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);
final DeploymentDescriptor descriptor = new DeploymentDescriptorImpl();
descriptor.getBuilder().addEventListener(new NamedObjectModel("mvel", "processIdentity", "new org.jbpm.kie.services.impl.IdentityProviderAwareProcessListener(ksession)"));
deploymentUnit.setDeploymentDescriptor(descriptor);
deploymentUnit.setStrategy(RuntimeStrategy.PER_CASE);
deploymentService.deploy(deploymentUnit);
return deploymentUnit;
}
use of org.jbpm.kie.services.impl.KModuleDeploymentUnit 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.kie.services.impl.KModuleDeploymentUnit 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.kie.services.impl.KModuleDeploymentUnit 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;
}
use of org.jbpm.kie.services.impl.KModuleDeploymentUnit in project jbpm by kiegroup.
the class RuntimeDataServiceImplTest method prepare.
@Before
public void prepare() {
configureServices();
logger.debug("Preparing kjar");
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(GROUP_ID, ARTIFACT_ID, VERSION);
List<String> processes = new ArrayList<String>();
processes.add("repo/processes/general/EmptyHumanTask.bpmn");
processes.add("repo/processes/general/humanTask.bpmn");
processes.add("repo/processes/general/BPMN2-UserTask.bpmn2");
processes.add("repo/processes/general/SimpleHTProcess.bpmn2");
processes.add("repo/processes/general/AdHocSubProcess.bpmn2");
InternalKieModule kJar1 = createKieJar(ks, releaseId, processes);
File pom = new File("target/kmodule", "pom.xml");
pom.getParentFile().mkdir();
try {
FileOutputStream fs = new FileOutputStream(pom);
fs.write(getPom(releaseId).getBytes());
fs.close();
} catch (Exception e) {
}
KieMavenRepository repository = getKieMavenRepository();
repository.deployArtifact(releaseId, kJar1, pom);
assertNotNull(deploymentService);
deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
assertNotNull(processService);
}
Aggregations