Search in sources :

Example 6 with ResponseCallback

use of org.kie.server.client.jms.ResponseCallback in project droolsjbpm-integration by kiegroup.

the class JmsResponseHandlerIntegrationTest method testStartProcessUseOfAsyncResponseHandlerWithMarshaller.

@Test
public void testStartProcessUseOfAsyncResponseHandlerWithMarshaller() throws Exception {
    ResponseCallback callback = new BlockingResponseCallback(createMarshaller());
    testStartProcessResponseHandler(new AsyncResponseHandler(callback));
    // now let's check if response has arrived
    Long processInstanceId = callback.get(Long.class);
    assertThat(processInstanceId).isNotNull().isPositive();
}
Also used : AsyncResponseHandler(org.kie.server.client.jms.AsyncResponseHandler) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) ResponseCallback(org.kie.server.client.jms.ResponseCallback) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) Test(org.junit.Test) JbpmKieServerBaseIntegrationTest(org.kie.server.integrationtests.jbpm.JbpmKieServerBaseIntegrationTest)

Example 7 with ResponseCallback

use of org.kie.server.client.jms.ResponseCallback in project droolsjbpm-integration by kiegroup.

the class JmsResponseHandlerIntegrationTest method testGlobalConfigurationOfAsyncResponseHandler.

@Test
public void testGlobalConfigurationOfAsyncResponseHandler() throws Exception {
    ResponseCallback callback = new BlockingResponseCallback(createMarshaller());
    testStartProcessWithGlobalConfiguration(new AsyncResponseHandler(callback));
    Long processInstanceId = callback.get(Long.class);
    assertThat(processInstanceId).isNotNull().isPositive();
}
Also used : AsyncResponseHandler(org.kie.server.client.jms.AsyncResponseHandler) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) ResponseCallback(org.kie.server.client.jms.ResponseCallback) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) Test(org.junit.Test) JbpmKieServerBaseIntegrationTest(org.kie.server.integrationtests.jbpm.JbpmKieServerBaseIntegrationTest)

Example 8 with ResponseCallback

use of org.kie.server.client.jms.ResponseCallback in project droolsjbpm-integration by kiegroup.

the class JmsResponseHandlerIntegrationTest method testGetProcessInstancesUseOfAsyncResponseHandlerWithMarshaller.

@Test
public void testGetProcessInstancesUseOfAsyncResponseHandlerWithMarshaller() throws Exception {
    ResponseCallback callback = new BlockingResponseCallback(createMarshaller());
    testGetProcessInstancesResponseHandler(new AsyncResponseHandler(callback));
    // now let's check if response has arrived
    ProcessInstanceList processInstanceList = callback.get(ProcessInstanceList.class);
    assertThat(processInstanceList).isNotNull();
    assertThat(processInstanceList.getItems()).isNotNull().hasSize(1);
}
Also used : ProcessInstanceList(org.kie.server.api.model.instance.ProcessInstanceList) AsyncResponseHandler(org.kie.server.client.jms.AsyncResponseHandler) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) ResponseCallback(org.kie.server.client.jms.ResponseCallback) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) Test(org.junit.Test) JbpmKieServerBaseIntegrationTest(org.kie.server.integrationtests.jbpm.JbpmKieServerBaseIntegrationTest)

Example 9 with ResponseCallback

use of org.kie.server.client.jms.ResponseCallback in project droolsjbpm-integration by kiegroup.

the class JmsResponseHandlerIntegrationTest method testQueryRegistrationUseOfAsyncResponseHandler.

@Test
public void testQueryRegistrationUseOfAsyncResponseHandler() throws Exception {
    ResponseCallback callback = new BlockingResponseCallback(null);
    testQueryRegistration(new AsyncResponseHandler(callback));
}
Also used : AsyncResponseHandler(org.kie.server.client.jms.AsyncResponseHandler) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) ResponseCallback(org.kie.server.client.jms.ResponseCallback) BlockingResponseCallback(org.kie.server.client.jms.BlockingResponseCallback) Test(org.junit.Test) JbpmKieServerBaseIntegrationTest(org.kie.server.integrationtests.jbpm.JbpmKieServerBaseIntegrationTest)

Aggregations

Test (org.junit.Test)9 AsyncResponseHandler (org.kie.server.client.jms.AsyncResponseHandler)9 BlockingResponseCallback (org.kie.server.client.jms.BlockingResponseCallback)9 ResponseCallback (org.kie.server.client.jms.ResponseCallback)9 JbpmKieServerBaseIntegrationTest (org.kie.server.integrationtests.jbpm.JbpmKieServerBaseIntegrationTest)7 Marshaller (org.kie.server.api.marshalling.Marshaller)2 FireAndForgetResponseHandler (org.kie.server.client.jms.FireAndForgetResponseHandler)2 RequestReplyResponseHandler (org.kie.server.client.jms.RequestReplyResponseHandler)2 ResponseHandler (org.kie.server.client.jms.ResponseHandler)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 BeforeClass (org.junit.BeforeClass)1 BatchExecutionCommand (org.kie.api.command.BatchExecutionCommand)1 Command (org.kie.api.command.Command)1 ExecutionResults (org.kie.api.runtime.ExecutionResults)1 ServiceResponsesList (org.kie.server.api.model.ServiceResponsesList)1 ProcessInstanceList (org.kie.server.api.model.instance.ProcessInstanceList)1 SolverInstance (org.kie.server.api.model.instance.SolverInstance)1 SolverInstanceList (org.kie.server.api.model.instance.SolverInstanceList)1 TaskSummaryList (org.kie.server.api.model.instance.TaskSummaryList)1