[
https://issues.apache.org/jira/browse/CAMEL-17755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17503006#comment-17503006
]
Nicolas Filotto commented on CAMEL-17755:
-----------------------------------------
Yes I'm aware of the switch EIP, I mean how would you rewrite the next example?
{code:java}
.doSwitch()
.when(simple("{{?red}}")).to("mock:red")
.when(simple("{{?blue}}")).to("mock:blue")
.end(){code}
I don't really get where the precondition should be set in the choice EIP?
Maybe the right approach could be to add a boolean "eager" on the choice node
to do the equivalent of doSwitch when it is set to true (false by default)?
> camel-core - DoSwitch can be Choice with precondition set
> ---------------------------------------------------------
>
> Key: CAMEL-17755
> URL: https://issues.apache.org/jira/browse/CAMEL-17755
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Nicolas Filotto
> Priority: Major
> Fix For: 3.17.0
>
>
> With CAMEL-17555 we use the term "precondition" to filter whether the
> route/EIP should be included or not (eager).
> To standardize on precondition then we can remove DoSwitch and use Choice
> instead and add precondition to choice.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)