Bug 1026384

Summary: An own type of object is not unmarshalled for the process instance
Product: [Retired] JBoss BPMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: kverlaen, rrajasek, rzhang, smcgowan
Target Milestone: ER 7   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:10:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ObjectVariableProcess none

Description Ivo Bek 2013-11-04 14:28:53 UTC
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

Comment 1 Ivo Bek 2013-11-04 14:36:42 UTC
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.

Comment 3 Marco Rietveld 2013-12-11 14:08:36 UTC
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.

Comment 4 Ivo Bek 2014-01-03 15:12:15 UTC
Verified in BPMS 6.0.0.ER7

The configuration for own remote client is quite complicated and it should be well documented!