Created attachment 819184 [details] ObjectVariableProcess Description of problem: I have a simple process with a script task and two variables, an object, and a type. The type is set in the script task and it's a type of the given object. When I send StartProcessCommand with my own type MyType, the type in the process instance is recognized as a org.apache.xerces.dom.ElementNSImpl. I have MyType class within the kjar in the same package but it seems it doesn't even try to unmarshall the object. How reproducible: Steps to Reproduce: 1. Deploy the attached kjar and create the following deployment unit: groupId: org.jboss artefact: integration version: 1.0.0.Final 2. Send the StartProcessCommand with myobject parameter via REST API: Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("myobject", new MyType("Hello World!")); rc.executeCommand(DEPLOYMENT_ID, new StartProcessCommand(OBJECT_VARIABLE_PROCESS_ID, parameters), MyType.class); Beware of BZ 1026355, you need to convert the JAXBObject on your own to add the MyType class to the JAXBContext. 3. See the server log where is printed: type = org.apache.xerces.dom.ElementNSImpl
It's also possible to use JMS API to reproduce the error. Don't use the JBPM Remote API there is no way how to set the MyType class to the JAXBContext. I'll file another BZ for that.
Fixed, commits: 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/806355b11712147d12abeb674d3e072eda676efc https://github.com/droolsjbpm/jbpm/commit/2a784d388c056a436d93250a2ffabe60e7fbbd03 master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/fe18c8382a33b5396cdcf0203bd10947a35989e0 https://github.com/droolsjbpm/jbpm/commit/cced0599fbe3eb258ab43c7689b88022302d499d I used this test to verify that the issue is fixed: https://github.com/droolsjbpm/kie-tests/blob/6.0.x/remote-kie-tests/kie-wb-tests/kie-wb-tests-base/src/main/java/org/kie/tests/wb/base/methods/RestIntegrationTestMethods.java#L435 (Run mvn clean test -Dtest=JbossEapBasicAuthRestIntegrationTest in the kie-wb-tests-eap module).
Additional problems related to this issue (serialization of classes when communicating via the REST or JMS API) have been fixed in - https://bugzilla.redhat.com/show_bug.cgi?id=1038229 I had made a mistake in the tests mentioned above. This issue should be fixed in ER6. However, if it isn't, please let me know! Thanks.
Verified in BPMS 6.0.0.ER7 The configuration for own remote client is quite complicated and it should be well documented!