This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch switch-eip
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0fcd7598fc19c5d0f7de3aeb50911fac08e594a5
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jan 26 13:30:14 2022 +0100

    CAMEL-17552: camel-core - Switch EIP that can optimize during bootstrap
---
 .../main/docs/modules/eips/pages/choice-eip.adoc   |  4 ++++
 .../main/docs/modules/eips/pages/switch-eip.adoc   | 24 ++++++++++++++++++++--
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc
index 2f45113..0428e9b 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc
@@ -143,3 +143,7 @@ component.
 There can be some combinations of 
xref:eips:enterprise-integration-patterns.adoc[EIP]s
 that can hit limits in how far we can take the fluent builder DSL with
 generics you can do in Java programming language.
+
+== See Also
+
+See xref:switch-eip.adoc[Switch EIP].
\ No newline at end of file
diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/switch-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/switch-eip.adoc
index c0e7e25..f7ce625 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/switch-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/switch-eip.adoc
@@ -2,7 +2,7 @@
 :doctitle: Switch
 :shortname: doSwitch
 :description: Route messages based on a series of predicates
-:since: 3.15.0
+:since:
 :supportlevel: Stable
 
 The Switch EIP is an optimized 
http://www.enterpriseintegrationpatterns.com/ContentBasedRouter.html[Content
@@ -64,10 +64,30 @@ And the same example using XML DSL:
         <otherwise>
             <to uri="direct:other"/>
         </otherwise>
-    </choice>
+    </doSwitch>
 </route>
 ----
 
+And in YAML DS:
+
+[source,yaml]
+----
+- from:
+    uri: "direct:a"
+    steps:
+      - doSwitch:
+          when:
+            - simple: "{{?foo}}"
+              steps:
+                - to: "direct:foo"
+            - simple: "{{?bar}}"
+              steps:
+                - to: "direct:bar"
+          otherwise:
+            steps:
+              - to: "direct:other"
+----
+
 TIP: Otherwise, is optional, and if none of the predicates would match, then 
no branches is selected.
 
 === Why can I not use otherwise in Java DSL

Reply via email to