Remote Client on JBPM7.3

55 views
Skip to first unread message

Artur Radosz

unread,
Sep 21, 2017, 3:30:14 AM9/21/17
to jBPM Usage
hi all,
for first thanks for wonderful work and great product. 

For second, we have developed some test remote client that is working great with jBPM6.3 but we cannot make it run on jBPM7.3
After initiating session it gives us exception on any remote API call.

Here is our code for initializing the client, the url has been changed to reflect change in the API:

 engine = RemoteRuntimeEngineFactory.newRestBuilder()
.addUrl(new URL("http://localhost:8080/kie-server/services/rest/server"))
.addUserName(user).addPassword(user)
.addDeploymentId("be.insys:PPAP:1.0").build();
And the exception with call to any of remote method:

org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to retrieve content from response
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:425)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeCommand(AbstractRemoteCommandObject.java:159)
at org.kie.services.client.api.command.KieSessionClientCommandObject.startProcess(KieSessionClientCommandObject.java:276)
at be.insys.ppap.bpm.simulator.Simulator.startProgram(Simulator.java:35)
at be.insys.ppap.bpm.test.PPAPWorkflowTests.testActors(PPAPWorkflowTests.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.NullPointerException
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:391)
... 27 more

It seems to be a problem in line 391 of AbstractRemoteCommandObject, the content type is null:

 String contentType = httpResponse.contentType();
                if( contentType.equals(MediaType.APPLICATION_XML) ) { 
                    String content = httpResponse.body();
                 

We have tried the latest stable and beta versions of the kie remote client.

Does it still work with latest jBPM or we have setup something wrongly?

best regards,
artur

Maciej Swiderski

unread,
Sep 21, 2017, 3:39:51 AM9/21/17
to Artur Radosz, jBPM Usage
Artur,
On 21 Sep 2017, at 09:30, Artur Radosz <arad...@gmail.com> wrote:

hi all,
for first thanks for wonderful work and great product. 
glad you like it


For second, we have developed some test remote client that is working great with jBPM6.3 but we cannot make it run on jBPM7.3
After initiating session it gives us exception on any remote API call.

v7 does not have execution engine in workbench anymore and the only execution server available is KIE Server. SO the code that you have below is no longer available in v7. You should switch to KIE Server for entire execution. You processes can still run as they were in 6 but the api for remote client is different.

See these articles that can give you bit more info

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/a994396b-75a2-416e-b1df-f24ad556562e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Artur Radosz

unread,
Sep 21, 2017, 3:44:55 AM9/21/17
to jBPM Usage
glad you like it

yes it is great one i really like and hope we will soon obtain commercial support as we are preparing an application for global corporation
For second, we have developed some test remote client that is working great with jBPM6.3 but we cannot make it run on jBPM7.3
After initiating session it gives us exception on any remote API call.

v7 does not have execution engine in workbench anymore and the only execution server available is KIE Server. SO the code that you have below is no longer available in v7. You should switch to KIE Server for entire execution. You processes can still run as they were in 6 but the api for remote client is different.

So it is still possible to have remote client but things has changed and we need to use different API?
Thanks a lot for a links, i will read it asap.

best regards,
artur
 

Maciej Swiderski

unread,
Sep 21, 2017, 3:52:15 AM9/21/17
to Artur Radosz, jBPM Usage
On 21 Sep 2017, at 09:44, Artur Radosz <arad...@gmail.com> wrote:

glad you like it

yes it is great one i really like and hope we will soon obtain commercial support as we are preparing an application for global corporation
For second, we have developed some test remote client that is working great with jBPM6.3 but we cannot make it run on jBPM7.3
After initiating session it gives us exception on any remote API call.

v7 does not have execution engine in workbench anymore and the only execution server available is KIE Server. SO the code that you have below is no longer available in v7. You should switch to KIE Server for entire execution. You processes can still run as they were in 6 but the api for remote client is different.

So it is still possible to have remote client but things has changed and we need to use different API?
yes, and it has much more capabilities than workbench remote client api

Maciej
 

Thanks a lot for a links, i will read it asap.

best regards,
artur
 

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.

Artur Radosz

unread,
Sep 21, 2017, 5:56:33 AM9/21/17
to jBPM Usage


W dniu czwartek, 21 września 2017 09:52:15 UTC+2 użytkownik Maciej Swiderski napisał:
yes, and it has much more capabilities than workbench remote client api

Maciej
 
I have migrated to new client in just 30 minutes. I must say that while it have much more capabilities that old one it is also much more faster. For instance creating process instance is 2-3 time faster while executing human task (claim,start, finish) takes 5 times less time.

great work!

best regards,
artur 

Maciej Swiderski

unread,
Sep 21, 2017, 7:19:23 AM9/21/17
to Artur Radosz, jBPM Usage
excellent, glad it was easy to migrate

maciej
great work!

best regards,
artur 

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages