Bug 1002927 - All REST APIs should use consistent input/output formats
All REST APIs should use consistent input/output formats
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ER5
: 6.0.0
Assigned To: Marco Rietveld
Petr Široký
Depends On:
  Show dependency treegraph
Reported: 2013-08-30 05:15 EDT by Petr Široký
Modified: 2016-09-20 01:04 EDT (History)
3 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Petr Široký 2013-08-30 05:15:49 EDT
Description of problem:

 - Business Central REST API uses JSON (only) as input/ouput data format 
 - Kie (jbpm) remote REST API uses XML (only) as input/output data format.

We should be consistent across the product - so either use only JSON or only XML or ideally both, so users have choice.

Note: Issue is logged under BRM Guvnor component, because the part of it lies there. It could be also filled under some jBPM component, but I can't select more than one component.

Version-Release number of selected component (if applicable):
Comment 1 Jervis Liu 2013-09-17 01:03:16 EDT
jbpm will support both xml and json.
Comment 3 Marco Rietveld 2013-10-01 06:27:40 EDT
All operations, *except the /execute* operation, can now also take or return JSON objects. 

The default is JAXB, but if the request contains an "Accept" header that references the "application/json" media type, then the operation will return JSON. 

The commit can be found here:

6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/d6815178305320eca2a1ea671ba36d54476bfbc3

master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/d58b76312f57ee4e337f4bbe17dc46dfb4f846d0
Comment 4 Marco Rietveld 2013-10-01 06:28:50 EDT
It's not practical to have the /execute operation support JSON because it would impact too many things: 

1. All command objects
2. Other projects depending on command object serialization (drools-camel, among others).
Comment 5 Petr Široký 2013-12-06 05:20:16 EST
Marking this as verified. KIE remote API now supports JSON for almost all operations (see in previous comments) and as Marco explained for rest of them it's not practical to use JSON.

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