You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2025/04/15 10:06:00 UTC

[jira] [Commented] (CAMEL-21967) camel-jbang - Transform route to yaml with CBR cannot load into Karavan

    [ https://issues.apache.org/jira/browse/CAMEL-21967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17944666#comment-17944666 ] 

Claus Ibsen commented on CAMEL-21967:
-------------------------------------

This is the java test code that dumped the yaml
{code:java}
public class Test extends RouteBuilder {

    @Override
    public void configure() throws Exception {

        // Write your routes here, for example:
        from("timer:java?period={{time:1000}}")
            .setBody()
                .simple("Hello Camel from ${routeId}")
            .choice()
              .when(simple("${header.foo} == 'bar'"))
                .to("direct:bar")
              .otherwise()
                .to("direct:cheese")
            .log("${body}");
    }
} {code}

> camel-jbang - Transform route to yaml with CBR cannot load into Karavan
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-21967
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21967
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 4.12.0
>
>
> The route dump 
> {code:java}
> - route:
>     from:
>       uri: timer
>       parameters:
>         timerName: java
>         period: "{{time:1000}}"
>       steps:
>         - setBody:
>             simple:
>               expression: "Hello Camel from ${routeId}"
>         - choice:
>             steps:
>               - when:
>                   simple:
>                     expression: "${header.foo} == 'bar'"
>                   steps:
>                     - to:
>                         uri: direct
>                         parameters:
>                           name: bar
>               - otherwise:
>                   steps:
>                     - to:
>                         uri: direct
>                         parameters:
>                           name: cheese
>                     - log:
>                         message: "${body}" {code}
> Cannot be loaded into Karavan or Kaoto. It may be the predicates that should be in the long form
> expression
>   simple
>      expression
> or something.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)