-
Bug
-
Resolution: Done
-
Minor
-
6.0.1
-
None
Description of problem:
I have a process definition with a custom type variable. When you start the process with a different unknown type, there are two scenarios what will happen for REST and JMS:
For JMS API, you will get at the time the process is being started:
Caused by: org.kie.services.client.serialization.SerializationException: Unable to load JAXB class 'org.jboss.qa.bpms.jbpm.integration.MyType2
at org.kie.services.client.serialization.JaxbSerializationProvider.commaSeperatedStringToClassSet(JaxbSerializationProvider.java:175) [kie-services-jaxb-6.0.2-redhat-4.jar:6.0.2-redhat-4]
at org.kie.services.remote.jms.RequestMessageBean.getJaxbSerializationProvider(RequestMessageBean.java:288) [kie-services-remote-6.0.2-redhat-4.jar:6.0.2-redhat-4]
... 68 more
Caused by: java.lang.ClassNotFoundException: org.jboss.qa.bpms.jbpm.integration.MyType2
at java.lang.ClassLoader.findClass(ClassLoader.java:531) [rt.jar:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [rt.jar:1.7.0_51]
at org.drools.core.common.ProjectClassLoader$InternalTypesClassLoader.loadType(ProjectClassLoader.java:300) [drools-core-6.0.2-redhat-4.jar:6.0.2-redhat-4]
at org.drools.core.common.ProjectClassLoader$InternalTypesClassLoader.loadClass(ProjectClassLoader.java:287) [drools-core-6.0.2-redhat-4.jar:6.0.2-redhat-4]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [rt.jar:1.7.0_51]
at org.kie.services.client.serialization.JaxbSerializationProvider.commaSeperatedStringToClassSet(JaxbSerializationProvider.java:173) [kie-services-jaxb-6.0.2-redhat-4.jar:6.0.2-redhat-4]
... 69 more
For REST API the behaviour is quite different. The start of process is successfully done but the object is of another type than expected and so when you want to use it, you will get:
org.apache.xerces.dom.ElementNSImpl cannot be cast to org.jboss.qa.bpms.jbpm.integration.MyType
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Create new data object with String property "text" using the Data modeler in Business Central
2. Create new business process with a variable of the type you created in the step 1 and add script task to print content of the variable.
3. Copy the type class to your client and RENAME it (e.g. from MyType to MyType2)
4. Use REST API or JMS API to start the process.
5. See the exceptions at the server side.
Actual results:
You get awful responses or the process behave wrongly just because an error response has not been returned earlier.
Expected results:
For bad parameters which are not recognized correctly, a BadRequest response is returned back with explanation that the type XYZ was not recognized.
Additional info: