Claus Ibsen created CAMEL-26120:
-----------------------------------
Summary: 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
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)