Search in sources :

Example 46 with DeploymentUnit

use of org.jbpm.services.api.model.DeploymentUnit 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 47 with DeploymentUnit

use of org.jbpm.services.api.model.DeploymentUnit 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 48 with DeploymentUnit

use of org.jbpm.services.api.model.DeploymentUnit 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 49 with DeploymentUnit

use of org.jbpm.services.api.model.DeploymentUnit 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)

Example 50 with DeploymentUnit

use of org.jbpm.services.api.model.DeploymentUnit in project jbpm by kiegroup.

the class EDefinitionTest method testProcessVariables.

@Test
public void testProcessVariables() {
    DeploymentUnit variableKieJar = archive.deployVariableKieJar();
    Map<String, String> variables = definitionService.getProcessVariables(variableKieJar.getIdentifier(), OBJECT_VARIABLE_PROCESS_ID);
    Assertions.assertThat(variables).isNotNull().hasSize(2).containsEntry("type", "String").containsEntry("myobject", "Object");
}
Also used : DeploymentUnit(org.jbpm.services.api.model.DeploymentUnit) Test(org.junit.Test) AbstractEJBServicesTest(org.jbpm.test.container.AbstractEJBServicesTest)

Aggregations

DeploymentUnit (org.jbpm.services.api.model.DeploymentUnit)104 KModuleDeploymentUnit (org.jbpm.kie.services.impl.KModuleDeploymentUnit)88 Test (org.junit.Test)53 After (org.junit.After)35 AbstractKieServicesBaseTest (org.jbpm.kie.test.util.AbstractKieServicesBaseTest)34 DeployedUnit (org.jbpm.services.api.model.DeployedUnit)28 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)25 ProcessDefinition (org.jbpm.services.api.model.ProcessDefinition)19 HashMap (java.util.HashMap)16 RuntimeManager (org.kie.api.runtime.manager.RuntimeManager)15 ArrayList (java.util.ArrayList)14 ProcessInstanceNotFoundException (org.jbpm.services.api.ProcessInstanceNotFoundException)13 QueryContext (org.kie.api.runtime.query.QueryContext)13 RuntimeEngine (org.kie.api.runtime.manager.RuntimeEngine)12 KieServices (org.kie.api.KieServices)10 ReleaseId (org.kie.api.builder.ReleaseId)10 InternalRuntimeManager (org.kie.internal.runtime.manager.InternalRuntimeManager)9 AbstractEJBServicesTest (org.jbpm.test.container.AbstractEJBServicesTest)8 Collection (java.util.Collection)6 DeployedUnitImpl (org.jbpm.kie.services.impl.DeployedUnitImpl)6