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 2016/04/26 09:08:13 UTC
[jira] [Resolved] (CAMEL-7180) Support multiple onWhen +
onOtherwise in onComplete blocks
[ https://issues.apache.org/jira/browse/CAMEL-7180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-7180.
--------------------------------
Resolution: Won't Fix
> Support multiple onWhen + onOtherwise in onComplete blocks
> ----------------------------------------------------------
>
> Key: CAMEL-7180
> URL: https://issues.apache.org/jira/browse/CAMEL-7180
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Affects Versions: 2.12.2
> Reporter: Raúl Kripalani
> Assignee: Raúl Kripalani
>
> Will allow for something like:
> {code}
> .onCompletion().onCompleteOnly()
> .onWhen(xpath("/result = 'ok'"))
> .log("All good!")
> .onWhen(xpath("/result = 'warn'"))
> .log(LoggingLevel.WARN, "Something didn't go quite as right!")
> .onOtherwise()
> .log(LoggingLevel.ERROR, "Something went awfully wrong!")
> .end()
> {code}
> This will specifically benefit route-level onComplete blocks, as only 1 is supported per route. Currently, if you want to take decisions, you have to create a nested choice() which feels clumsy, given that the onComplete DSL already supports some degree of decision-making.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)