[ 
https://issues.apache.org/jira/browse/CAMEL-26133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-26133.
---------------------------------
    Resolution: Fixed

Fixed by https://github.com/apache/camel/pull/28907 (merged to main as 
ca69f7cf44241fc740bff6e6e9ec08fbaf3428f7).

_Claude Code on behalf of Claus Ibsen (davsclaus)_

> camel-robotframework - the consumer fails on every poll, and the producer 
> fails on a null body or any null header or property
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26133
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26133
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> Found while adding the catalog body types of mapstruct, robotframework, 
> citrus and spring-event (CAMEL-24961, PR #28417).
> h4. 1. The consumer can never deliver
> The polled exchange of the consumer has a null body, and 
> {{RobotFrameworkCamelUtils.createRobotVariablesFromCamelExchange}} (main 
> 2a465aa4814c, line 53) converts the body with 
> {{mandatoryConvertTo(String.class, ...)}}, so every poll fails with 
> NoTypeConversionAvailableException and the consumer never runs a test. 
> Checked on 4.24.0-SNAPSHOT in-process.
> Proposed: skip (or pass as empty) a null body when building the robot 
> variables.
> h4. 2. The producer fails on a null body or any null header or property value
> The same {{mandatoryConvertTo}} is used for the body (main 2a465aa4814c, line 
> 53) and for every header and exchange property (line 91), so a producer call 
> with a null body, or with any header or property whose value is null, fails. 
> The doc's examples that use only headers or only properties fail for this 
> reason. Checked on 4.24.0-SNAPSHOT in-process.
> Proposed: skip null values (or map them to an empty value) when building the 
> robot variables.
> h4. 3. The examples put the body into an expression
> The examples of the page (robotframework-component.adoc, lines 126, 145 and 
> 163) use {{Should Be True    ${myvar} == ${body}}}, which puts the message 
> body (and a header and a property) into an expression that Robot Framework 
> evaluates as Python.
> Proposed: compare the values as strings ({{Should Be Equal    ${myvar}    
> ${body}}}), and add a sentence that the body should not be put into an 
> evaluated expression.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to