[
https://issues.apache.org/jira/browse/CAMEL-26120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136528#comment-18136528
]
Claus Ibsen commented on CAMEL-26120:
-------------------------------------
PR: https://github.com/apache/camel/pull/28897
* The id of the started case is now set in the new {{CamelBonitaCaseId}}
header. The body stays the Map of the inputs.
* The producer reads the body with {{getMandatoryBody(Map.class)}}: a JSON text
body (or no body) fails with {{InvalidPayloadException}} naming the body type,
before any request goes to Bonita. JSON text is not parsed; unmarshal it to a
Map first.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> camel-bonita - startCase throws away the id of the started case, and a JSON
> text body fails with The contract input is null
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26120
> URL: https://issues.apache.org/jira/browse/CAMEL-26120
> Project: Camel
> Issue Type: Bug
> Components: camel-bonita
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of flowable, camunda and bonita
> (CAMEL-24961, PR #28418).
> h4. 1. The id of the started case is thrown away
> {{BonitaStartProducer.process}} (main 2a465aa4814c, line 71) calls
> {{api.startCase(...)}} and ignores the returned {{CaseCreationResponse}}, so
> the {{caseId}} of the new case is not in the body or a header and the route
> cannot follow the case. Checked on 4.24.0-SNAPSHOT with WireMock.
> Proposed: set the case id (or the {{CaseCreationResponse}}) as the out body,
> or in a header.
> h4. 2. A JSON text body fails with the misleading "The contract input is null"
> The producer reads the body with {{getBody(Map.class)}} (main 2a465aa4814c,
> {{BonitaStartProducer}} line 71); a JSON String body does not convert to a
> Map, so {{BonitaAPI.startCase}} (line 90) fails with "The contract input is
> null" although a body was sent. Checked on 4.24.0-SNAPSHOT with WireMock.
> Proposed: use {{getMandatoryBody(Map.class)}} so the error names the body
> type, or parse a JSON text body into a Map.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)