use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class BPMN2DataServicesReferencesTest method prepare.
@Before
public void prepare() {
configureServices();
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(GROUP_ID, ARTIFACT_ID, VERSION);
List<String> resources = new ArrayList<String>();
// extension
if (loadGlobalImportProcesses) {
resources.add("repo/processes/references/importWithScriptTask.bpmn2");
resources.add("repo/processes/references/globalBasedOnEntryExitScriptProcess.bpmn2");
}
// call activity (referenced sub processes)
if (loadCallActivityProcesses) {
resources.add("repo/processes/references/callActivityByNameParent.bpmn2");
resources.add("repo/processes/references/callActivityParent.bpmn2");
resources.add("repo/processes/references/callActivitySubProcess.bpmn2");
}
// item def, business rules
if (loadBusinesRuleProcesses) {
resources.add("repo/processes/references/businessRuleTask.bpmn2");
resources.add("repo/processes/references/businessRuleTask.drl");
}
// qualified class in script
if (loadJavaMvelScriptProcesses) {
resources.add("repo/processes/references/javaScriptTaskWithQualifiedClass.bpmn2");
resources.add("repo/processes/references/javaScriptTaskWithQualifiedClassItemDefinition.bpmn2");
resources.add("repo/processes/references/mvelScriptTaskWithQualifiedClass.bpmn2");
resources.add("repo/processes/references/rulesScriptTaskWithQualifiedClass.bpmn2");
}
// qualified class in script
if (loadSignalGlobalInfoProcess) {
resources.add("repo/processes/general/signal.bpmn");
}
InternalKieModule kJar1 = createKieJar(ks, releaseId, resources);
File pom = new File("target/kmodule", "pom.xml");
pom.getParentFile().mkdir();
FileOutputStream fs = null;
try {
fs = new FileOutputStream(pom);
fs.write(getPom(releaseId).getBytes());
} catch (Exception e) {
fail("Unable to write pom.xml to filesystem: " + e.getMessage());
}
try {
fs.close();
} catch (Exception e) {
logger.info("Unable to close fileystem used to write pom.xml");
}
KieMavenRepository repository = getKieMavenRepository();
repository.deployArtifact(releaseId, kJar1, pom);
// check
assertNotNull(deploymentService);
deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
deploymentId = deploymentUnit.getIdentifier();
procInstIds.clear();
}
use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class BPMN2DataServicesTest method prepare.
@Before
public void prepare() {
configureServices();
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(GROUP_ID, ARTIFACT_ID, VERSION);
List<String> processes = new ArrayList<String>();
processes.add("repo/processes/hr/hiring.bpmn2");
processes.add("repo/processes/general/customtask.bpmn");
processes.add("repo/processes/general/humanTask.bpmn");
processes.add("repo/processes/general/import.bpmn");
processes.add("repo/processes/general/callactivity.bpmn");
processes.add("repo/processes/general/BPMN2-UserTask.bpmn2");
processes.add("repo/processes/itemrefissue/itemrefissue.bpmn");
processes.add("repo/processes/general/ObjectVariableProcess.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);
}
use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class ClassloaderKModuleDeploymentServiceTest method prepare.
@Before
public void prepare() {
configureServices();
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(GROUP_ID, ARTIFACT_ID, VERSION);
File kjar = new File("src/test/resources/kjar/jbpm-module.jar");
File pom = new File("src/test/resources/kjar/pom.xml");
KieMavenRepository repository = getKieMavenRepository();
repository.installArtifact(releaseId, kjar, pom);
}
use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class DeploymentServiceTest method prepare.
@Before
public void prepare() {
configureServices();
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/customtask.bpmn");
processes.add("repo/processes/general/humanTask.bpmn");
processes.add("repo/processes/general/signal.bpmn");
processes.add("repo/processes/general/import.bpmn");
processes.add("repo/processes/general/callactivity.bpmn");
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);
ReleaseId releaseIdSupport = ks.newReleaseId(GROUP_ID, "support", VERSION);
List<String> processesSupport = new ArrayList<String>();
processesSupport.add("repo/processes/support/support.bpmn");
InternalKieModule kJar2 = createKieJar(ks, releaseIdSupport, processesSupport);
File pom2 = new File("target/kmodule2", "pom.xml");
pom2.getParentFile().mkdir();
try {
FileOutputStream fs = new FileOutputStream(pom2);
fs.write(getPom(releaseIdSupport).getBytes());
fs.close();
} catch (Exception e) {
}
repository.deployArtifact(releaseIdSupport, kJar2, pom2);
ReleaseId releaseId3 = ks.newReleaseId(GROUP_ID, ARTIFACT_ID, "1.1.0-SNAPSHOT");
processes.add("repo/rules/RuleWIthDeclaredType.drl");
InternalKieModule kJar3 = createKieJar(ks, releaseId3, processes);
File pom3 = new File("target/kmodule3", "pom.xml");
pom3.getParentFile().mkdirs();
try {
FileOutputStream fs = new FileOutputStream(pom3);
fs.write(getPom(releaseId3).getBytes());
fs.close();
} catch (Exception e) {
}
repository = getKieMavenRepository();
repository.deployArtifact(releaseId3, kJar3, pom3);
}
use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class DeploymentServiceWithSyncTest method prepare.
@Before
public void prepare() {
configureServices();
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/customtask.bpmn");
processes.add("repo/processes/general/humanTask.bpmn");
processes.add("repo/processes/general/signal.bpmn");
processes.add("repo/processes/general/import.bpmn");
processes.add("repo/processes/general/callactivity.bpmn");
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);
ReleaseId releaseIdSupport = ks.newReleaseId(GROUP_ID, "support", VERSION);
List<String> processesSupport = new ArrayList<String>();
processesSupport.add("repo/processes/support/support.bpmn");
InternalKieModule kJar2 = createKieJar(ks, releaseIdSupport, processesSupport);
File pom2 = new File("target/kmodule2", "pom.xml");
pom2.getParentFile().mkdir();
try {
FileOutputStream fs = new FileOutputStream(pom2);
fs.write(getPom(releaseIdSupport).getBytes());
fs.close();
} catch (Exception e) {
}
repository.deployArtifact(releaseIdSupport, kJar2, pom2);
configureDeploymentSync();
}
Aggregations