Bug 1026384 - An own type of object is not unmarshalled for the process instance
An own type of object is not unmarshalled for the process instance
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity high
: ER 7
: 6.0.0
Assigned To: Marco Rietveld
Ivo Bek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-04 09:28 EST by Ivo Bek
Modified: 2016-09-20 01:05 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:10:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ObjectVariableProcess (5.83 KB, application/x-java-archive)
2013-11-04 09:28 EST, Ivo Bek
no flags Details

  None (edit)
Description Ivo Bek 2013-11-04 09:28:53 EST
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 09:36:42 EST
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 09:08:36 EST
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 10:12:15 EST
Verified in BPMS 6.0.0.ER7

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

Note You need to log in before you can comment on or make changes to this bug.