use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class PostDeploymentServiceTest 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);
}
use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class ProcessServiceImplPerProcessInstanceTest 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/customtask.bpmn");
processes.add("repo/processes/general/humanTask.bpmn");
processes.add("repo/processes/general/import.bpmn");
processes.add("repo/processes/general/signal.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);
deploymentService.deploy(deploymentUnit);
}
use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class TxUserTaskServiceImplTest 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/tx/child-process-01.bpmn2");
processes.add("repo/processes/tx/parent-process-01.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.installArtifact(releaseId, kJar1, pom);
assertNotNull(deploymentService);
deploymentUnit = new KModuleDeploymentUnit(GROUP_ID, ARTIFACT_ID, VERSION);
deploymentService.deploy(deploymentUnit);
units.add(deploymentUnit);
assertNotNull(processService);
}
use of org.kie.scanner.KieMavenRepository in project jbpm by kiegroup.
the class UserTaskServiceImplTest 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/NoFormNameHumanTask.bpmn");
processes.add("repo/processes/general/BPMN2-UserTaskImageVar.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);
}
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();
}
Aggregations