You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2014/02/07 18:19:19 UTC
[jira] [Created] (CAMEL-7180) Support multiple onWhen + onOtherwise
in onComplete blocks
Raul Kripalani created CAMEL-7180:
-------------------------------------
Summary: 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: Raul Kripalani
Assignee: Raul 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. So 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.1.5#6160)