Search in sources :

Example 81 with KModuleDeploymentUnit

use of org.jbpm.kie.services.impl.KModuleDeploymentUnit in project jbpm by kiegroup.

the class CaseCommentNotificationTest 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 ObjectModel("mvel", "new org.jbpm.kie.services.impl.IdentityProviderAwareProcessListener(ksession)")).addEventListener(new ObjectModel("mvel", "org.jbpm.casemgmt.impl.util.CommentNotificationEventListenerFactory.get(\"test\")"));
    deploymentUnit.setDeploymentDescriptor(descriptor);
    deploymentUnit.setStrategy(RuntimeStrategy.PER_CASE);
    deploymentService.deploy(deploymentUnit);
    return deploymentUnit;
}
Also used : ObjectModel(org.kie.internal.runtime.conf.ObjectModel) DeploymentDescriptor(org.kie.internal.runtime.conf.DeploymentDescriptor) DeploymentDescriptorImpl(org.jbpm.runtime.manager.impl.deploy.DeploymentDescriptorImpl) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit)

Example 82 with KModuleDeploymentUnit

use of org.jbpm.kie.services.impl.KModuleDeploymentUnit in project jbpm by kiegroup.

the class EJBService method deployTransactionKieJar.

public DeploymentUnit deployTransactionKieJar() {
    KieServices ks = KieServices.Factory.get();
    ReleaseId releaseId = ks.newReleaseId(KieJar.TX.groupId, KieJar.TX.artifactId, KieJar.TX.version);
    List<String> assets = new ArrayList<String>();
    assets.add("ScriptTask.bpmn2");
    assets.add("TxProcess.bpmn2");
    assets.add("TxRules.drl");
    assets.add("TxBoundaryEventProcess.bpmn2");
    deployKieJar(ks, releaseId, assets);
    DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(KieJar.TX.getGroupId(), KieJar.TX.getArtifactId(), KieJar.TX.getVersion());
    deploymentService.deploy(deploymentUnit);
    units.add(deploymentUnit);
    return deploymentUnit;
}
Also used : ArrayList(java.util.ArrayList) KieServices(org.kie.api.KieServices) ReleaseId(org.kie.api.builder.ReleaseId) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit)

Example 83 with KModuleDeploymentUnit

use of org.jbpm.kie.services.impl.KModuleDeploymentUnit in project jbpm by kiegroup.

the class EJBService method deployMigrationV1KieJar.

public DeploymentUnit deployMigrationV1KieJar() {
    KieServices ks = KieServices.Factory.get();
    ReleaseId releaseId = ks.newReleaseId(KieJar.MIGRATIONV1.groupId, KieJar.MIGRATIONV1.artifactId, KieJar.MIGRATIONV1.version);
    List<String> assets = new ArrayList<String>();
    assets.add("evaluation1.bpmn2");
    deployKieJar(ks, releaseId, assets);
    DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(KieJar.MIGRATIONV1.getGroupId(), KieJar.MIGRATIONV1.getArtifactId(), KieJar.MIGRATIONV1.getVersion());
    deploymentService.deploy(deploymentUnit);
    units.add(deploymentUnit);
    return deploymentUnit;
}
Also used : ArrayList(java.util.ArrayList) KieServices(org.kie.api.KieServices) ReleaseId(org.kie.api.builder.ReleaseId) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit)

Example 84 with KModuleDeploymentUnit

use of org.jbpm.kie.services.impl.KModuleDeploymentUnit in project jbpm by kiegroup.

the class EJBService method deployMigrationV2KieJar.

public DeploymentUnit deployMigrationV2KieJar() {
    KieServices ks = KieServices.Factory.get();
    ReleaseId releaseId = ks.newReleaseId(KieJar.MIGRATIONV2.groupId, KieJar.MIGRATIONV2.artifactId, KieJar.MIGRATIONV2.version);
    List<String> assets = new ArrayList<String>();
    assets.add("evaluation2.bpmn2");
    deployKieJar(ks, releaseId, assets);
    DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(KieJar.MIGRATIONV2.getGroupId(), KieJar.MIGRATIONV2.getArtifactId(), KieJar.MIGRATIONV2.getVersion());
    deploymentService.deploy(deploymentUnit);
    units.add(deploymentUnit);
    return deploymentUnit;
}
Also used : ArrayList(java.util.ArrayList) KieServices(org.kie.api.KieServices) ReleaseId(org.kie.api.builder.ReleaseId) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit)

Example 85 with KModuleDeploymentUnit

use of org.jbpm.kie.services.impl.KModuleDeploymentUnit in project jbpm by kiegroup.

the class EJBService method deployBasicKieJar.

public DeploymentUnit deployBasicKieJar() {
    KieServices ks = KieServices.Factory.get();
    ReleaseId releaseId = ks.newReleaseId(KieJar.BASIC.groupId, KieJar.BASIC.artifactId, KieJar.BASIC.version);
    List<String> assets = new ArrayList<String>();
    assets.add("ScriptTask.bpmn2");
    assets.add("HumanTask.bpmn2");
    assets.add("IntermediateSignalProcess.bpmn2");
    deployKieJar(ks, releaseId, assets);
    DeploymentUnit deploymentUnit = new KModuleDeploymentUnit(KieJar.BASIC.getGroupId(), KieJar.BASIC.getArtifactId(), KieJar.BASIC.getVersion());
    deploymentService.deploy(deploymentUnit);
    units.add(deploymentUnit);
    return deploymentUnit;
}
Also used : ArrayList(java.util.ArrayList) KieServices(org.kie.api.KieServices) ReleaseId(org.kie.api.builder.ReleaseId) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit) DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) KModuleDeploymentUnit(org.jbpm.kie.services.impl.KModuleDeploymentUnit)

Aggregations

KModuleDeploymentUnit (org.jbpm.kie.services.impl.KModuleDeploymentUnit)170 Test (org.junit.Test)131 AbstractKieServicesBaseTest (org.jbpm.kie.test.util.AbstractKieServicesBaseTest)97 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)83 DeploymentUnit (org.jbpm.services.api.model.DeploymentUnit)55 HashMap (java.util.HashMap)46 DeployedUnit (org.jbpm.services.api.model.DeployedUnit)42 ArrayList (java.util.ArrayList)34 QueryContext (org.kie.api.runtime.query.QueryContext)34 ReleaseId (org.kie.api.builder.ReleaseId)29 KieServices (org.kie.api.KieServices)26 File (java.io.File)22 ProcessDefinition (org.jbpm.services.api.model.ProcessDefinition)22 DeploymentDescriptor (org.kie.internal.runtime.conf.DeploymentDescriptor)21 DeploymentDescriptorImpl (org.jbpm.runtime.manager.impl.deploy.DeploymentDescriptorImpl)19 ProcessInstanceNotFoundException (org.jbpm.services.api.ProcessInstanceNotFoundException)19 RuntimeManager (org.kie.api.runtime.manager.RuntimeManager)19 Before (org.junit.Before)18 FileOutputStream (java.io.FileOutputStream)17 InternalKieModule (org.drools.compiler.kie.builder.impl.InternalKieModule)17