Bug 1315636 - Type information is lost when using JSON Marshaller for sending GetObject command to KieServer
Type information is lost when using JSON Marshaller for sending GetObject com...
Status: CLOSED DUPLICATE of bug 1283208
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Kie-Server (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Maciej Swiderski
Karel Suta
:
Depends On: 1283208
Blocks: 1315767
  Show dependency treegraph
 
Reported: 2016-03-08 04:50 EST by Anton Giertli
Modified: 2016-04-06 22:07 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1315767 (view as bug list)
Environment:
Last Closed: 2016-04-06 22:07:48 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)

  None (edit)
Description Anton Giertli 2016-03-08 04:50:43 EST
Description of problem:
If you send GetObject command using JSON to the KieServer, the type information is lost.

The type information is present when using XStream for example, 

Version-Release number of selected component (if applicable):

BRMS 6.2.1

How reproducible:

always
Steps to Reproduce:
1. Deploy some KJAR onto the KieServer
2. Insert some custom object into the KieSesession and call GetObject command to retrieve it
3. If you use JSON marshaller, the type information for this Custom Object is lost


Sample client code for interacting with the KieServer
https://gist.github.com/agiertli/d8ee2ab934cf1987097b

The server response of the above call is this:

{
  "results" : [ {
    "key" : "insert-identifier",
    "value" : {"org.Person":{
  "name" : "anton"
}}
  }, {
    "key" : "get-obj-response",
    "value" : [ {
  "name" : "anton"
} ]
  }, {
    "key" : "fire-identifier",
    "value" : 0
  } ],
  "facts" : [ {
    "key" : "insert-identifier",
    "value" : {"org.drools.core.common.DefaultFactHandle":{
  "external-form" : "0:1:823286421:823286421:1:DEFAULT:NON_TRAIT:org.Person"
}}
  } ]
}

The object inserted is of type org.Person - as you can see, under "get-obj-response" this type is simply not listed.

The response could look like this:

"results" : [ {
    "key" : "responseObjects",
    "value" : [
{"org.Person":{
  "name" : "anton",...
}},
...

Actual results:
 Type information about the custom object is lost, when sending GetObject command to KieServer using JSON

Expected results:

 Type information about the custom object is lost, when sending GetObject command to KieServer using JSON
Additional info:
Comment 4 Karel Suta 2016-03-14 08:45:10 EDT
This issue was already fixed for 6.3.0 by https://github.com/droolsjbpm/droolsjbpm-integration/pull/253.
Comment 5 Edson Tirelli 2016-04-06 22:07:48 EDT

*** This bug has been marked as a duplicate of bug 1283208 ***

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