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 2021/06/25 14:28:00 UTC
[jira] [Comment Edited] (CAMEL-16630) camel-core - Route model to
allow inlined local beans for XML and other DSLs
[ https://issues.apache.org/jira/browse/CAMEL-16630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17369432#comment-17369432 ]
Claus Ibsen edited comment on CAMEL-16630 at 6/25/21, 2:27 PM:
---------------------------------------------------------------
We can add support for #class so you can do *DONE*
{code}
- from:
uri: "direct:route"
steps:
- aggregate:
strategy-ref: "#class:org.apache.camel.processor.aggregate.UseLatestAggregationStrategy"
completion-size: 2
correlation-expression:
simple: "${header.StockSymbol}"
steps:
- to: "mock:route"
{code}
was (Author: davsclaus):
We can add support for #class so you can do
{code}
- from:
uri: "direct:route"
steps:
- aggregate:
strategy-ref: "#class:org.apache.camel.processor.aggregate.UseLatestAggregationStrategy"
completion-size: 2
correlation-expression:
simple: "${header.StockSymbol}"
steps:
- to: "mock:route"
{code}
> camel-core - Route model to allow inlined local beans for XML and other DSLs
> ----------------------------------------------------------------------------
>
> Key: CAMEL-16630
> URL: https://issues.apache.org/jira/browse/CAMEL-16630
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 3.12.0
>
>
> With the introduction of local beans for route templates / kamelets. This brings to the table of allowing to use that more generic in Camel DSL.
> When using XML DSL and other markup DSLs then you have use-cases where you need to define a bean for aggregation strategy, etc, and today you have to write that as java bean and refer to it by bean id.
> With local bean you can then inline this and create the bean code in the XML or YAML dsl with script. Can be good for simple code (not very complex).
> We can look at to add a special annotation in the model, that marks something as a local bean compliant, so we can generate this in the XML XSD, YAML DSL accordingly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)