Description of problem: If you call Collection<ProcessInstance> processInstances = ksession.getProcessInstances(); when using the rest endpoints you end up with the following exception : Exception in thread "main" java.lang.ClassCastException: org.kie.services.client.serialization.jaxb.impl.task.JaxbTaskResponse cannot be cast to java.util.Collection at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.getProcessInstances(CommandBasedStatefulKnowledgeSession.java:135) at org.jbpm.simple.rest.client.SimpleRestClient.main(SimpleRestClient.java:44) Version-Release number of selected component (if applicable): How reproducible: Clone the jbpm playground (https://github.com/droolsjbpm/jbpm-playground/tree/master/jbpm-simple-rest-client) repository and open the jbpm-simple-rest-client Add to the example the following lines: Collection<ProcessInstance> processInstances = ksession.getProcessInstances(); for(ProcessInstance pi : processInstances){ System.out.println("Process Instance: "+pi.getProcessId() + pi.getProcessName()); } Notice that if you don't try to use the process instance collection you will not get an error. Also notice that in order to reproduce this issue you need to get running the KIE-WB. Due the fact that unit tests doesn't marshall all the data as a real client. Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Fixed. 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/5289cee064ff3c6873822ae92d96ef5e8224b7c5 master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/afc3c937f3defd96fa42064c60677d6df46da51d
Also: 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/52b039bf5026dae26222414f6d3d258f1bd800b1 master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/cdc33c138ad3dbda29dce2e2bf5eb64bc23fcab6
Verified in BPMS 6.0.0.ER5