[jboss-jira] [JBoss JIRA] (DROOLS-5341) ExecutionResultImpl not properly serialized in JSon Response

Steve Davidson (Jira) issues at jboss.org
Fri May 15 15:31:01 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-5341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Davidson updated DROOLS-5341:
-----------------------------------
    Description: 
When a Drools Batch command has been processed, the conversion of the Kie ServiceResponse to JSON incorrectly serializes the ExecutionResponseImple. The resulting message looks like:
{code:json}
{
  "org.kie.server.api.model.ServiceResponse" : {
    "type" : "SUCCESS",
    "msg" : "Container Kie Demo: kie-server successfully called.",
    "result" : {
      "ExecutionResultImpl" : {
        "results" : [ ],
        "facts" : [ ]
      }
    }
  }
}
{code}
This results in deserialization failure of the client side as the type of the result can not be determined.  The correct response should be:
{code:json}
{
  "org.kie.server.api.model.ServiceResponse" : {
    "type" : "SUCCESS",
    "msg" : "Container Kie Demo: kie-server successfully called.",
    "result" : {
      "execution-results" : {
        "results" : [ ],
        "facts" : [ ]
      }
    }
  }
}
{code}


  was:
When a Drools Batch command has been processed, the conversion of the Kie ServiceResponse to JSON incorrectly serializes the ExecutionResponseImple. The resulting message looks like:
{code:json}
{
  "org.kie.server.api.model.ServiceResponse" : {
    "type" : "SUCCESS",
    "msg" : "Container Kie Demo: kie-server successfully called.",
    "result" : {
      "ExecutionResultImpl" : {
        "results" : [ ],
        "facts" : [ ]
      }
    }
  }
}
{code}
This results in deserialization failure of the client side as the type of the result can not be determined.  The correct response should be:
{code:json}
{
  "org.kie.server.api.model.ServiceResponse" : {
    "type" : "SUCCESS",
    "msg" : "Container Kie Demo: kie-server successfully called.",
    "result" : {
      "execution-results" : {
        "results" : [ ],
        "facts" : [ ]
      }
    }
  }
}
{code:json}




> ExecutionResultImpl not properly serialized in JSon Response
> ------------------------------------------------------------
>
>                 Key: DROOLS-5341
>                 URL: https://issues.redhat.com/browse/DROOLS-5341
>             Project: Drools
>          Issue Type: Bug
>    Affects Versions: 7.29.0.Final
>            Reporter: Steve Davidson
>            Assignee: Mario Fusco
>            Priority: Major
>              Labels: drools, kie, kie-server
>         Attachments: KieIssueDemo.tbz
>
>
> When a Drools Batch command has been processed, the conversion of the Kie ServiceResponse to JSON incorrectly serializes the ExecutionResponseImple. The resulting message looks like:
> {code:json}
> {
>   "org.kie.server.api.model.ServiceResponse" : {
>     "type" : "SUCCESS",
>     "msg" : "Container Kie Demo: kie-server successfully called.",
>     "result" : {
>       "ExecutionResultImpl" : {
>         "results" : [ ],
>         "facts" : [ ]
>       }
>     }
>   }
> }
> {code}
> This results in deserialization failure of the client side as the type of the result can not be determined.  The correct response should be:
> {code:json}
> {
>   "org.kie.server.api.model.ServiceResponse" : {
>     "type" : "SUCCESS",
>     "msg" : "Container Kie Demo: kie-server successfully called.",
>     "result" : {
>       "execution-results" : {
>         "results" : [ ],
>         "facts" : [ ]
>       }
>     }
>   }
> }
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list