Search in sources :

Example 1 with EJBClient

use of org.jbpm.remote.ejb.test.client.EJBClient in project jbpm by kiegroup.

the class RemoteEjbTest method setUpClass.

@BeforeClass
public static void setUpClass() throws Exception {
    MavenProject kjar = TestKjars.INTEGRATION;
    ejb = new EJBClient(kjar.getGav());
    if (!ejb.isDeployed(kjar.getGav())) {
        deployKjar(kjar);
    }
}
Also used : MavenProject(org.jbpm.remote.ejb.test.maven.MavenProject) EJBClient(org.jbpm.remote.ejb.test.client.EJBClient) BeforeClass(org.junit.BeforeClass)

Example 2 with EJBClient

use of org.jbpm.remote.ejb.test.client.EJBClient in project jbpm by kiegroup.

the class EGetProcessInstanceTest method getProcessInstancesByDeploymentId.

@Test()
public void getProcessInstancesByDeploymentId() throws NamingException {
    EJBClient ejbClient2 = new EJBClient(TestKjars.BPMN_BUILD_TEST.getGav());
    startProcess("org.jboss.qa.bpms.HumanTask", new HashMap<>(), 3);
    startProcess("org.jboss.qa.bpms.HumanTaskWithOwnType", new HashMap<>(), 5);
    ejbClient2.startProcess("bpmnBuildTest.myProcess");
    List<Integer> states = new ArrayList<>();
    states.add(ProcessInstance.STATE_ACTIVE);
    List<ProcessInstanceDesc> foundList = ejb.getProcessInstancesByDeploymentId(TestKjars.INTEGRATION.getGav(), states, new QueryContext());
    Assertions.assertThat(foundList).hasSize(8);
    for (ProcessInstanceDesc pid : foundList) {
        Assertions.assertThat(pid.getProcessName()).isIn("HumanTask", "HumanTaskWithOwnType");
    }
}
Also used : EJBClient(org.jbpm.remote.ejb.test.client.EJBClient) ArrayList(java.util.ArrayList) ProcessInstanceDesc(org.jbpm.services.api.model.ProcessInstanceDesc) QueryContext(org.kie.internal.query.QueryContext) RemoteEjbTest(org.jbpm.remote.ejb.test.RemoteEjbTest) Test(org.junit.Test)

Aggregations

EJBClient (org.jbpm.remote.ejb.test.client.EJBClient)2 ArrayList (java.util.ArrayList)1 RemoteEjbTest (org.jbpm.remote.ejb.test.RemoteEjbTest)1 MavenProject (org.jbpm.remote.ejb.test.maven.MavenProject)1 ProcessInstanceDesc (org.jbpm.services.api.model.ProcessInstanceDesc)1 BeforeClass (org.junit.BeforeClass)1 Test (org.junit.Test)1 QueryContext (org.kie.internal.query.QueryContext)1