Author: ruwan
Date: Mon Nov 22 09:59:29 2010
New Revision: 1037655

URL: http://svn.apache.org/viewvc?rev=1037655&view=rev
Log:
Adding the sample upgrade for filter configuration

Modified:
    synapse/branches/2.0/src/site/xdoc/upgrading.xml

Modified: synapse/branches/2.0/src/site/xdoc/upgrading.xml
URL: 
http://svn.apache.org/viewvc/synapse/branches/2.0/src/site/xdoc/upgrading.xml?rev=1037655&r1=1037654&r2=1037655&view=diff
==============================================================================
--- synapse/branches/2.0/src/site/xdoc/upgrading.xml (original)
+++ synapse/branches/2.0/src/site/xdoc/upgrading.xml Mon Nov 22 09:59:29 2010
@@ -117,7 +117,41 @@
           <subsection name="Filter Mediator">
             <p>From 2.0.0 onwards Synapse filter mediator supports the else 
close as well, and hence
             the filter matching set of mediators has to be enclosed within a 
&lt;then&gt; element.</p>
-              <!--todo: sample-->
+            <p>If we consider the following sample from the 1.2 version of 
synapse;
+            <pre xml:space="preserve">&lt;filter 
source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address 
uri=&quot;http://localhost:9000/soap/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+        &lt;drop/&gt;
+    &lt;/filter&gt;</pre>
+            the equivalent configuration for the 2.0.0 release is going to be;
+            <pre xml:space="preserve">&lt;filter 
source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
+        &lt;then&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address 
uri=&quot;http://localhost:9000/soap/SimpleStockQuoteService&quot;/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;then/&gt;
+    &lt;/filter&gt;</pre>
+            You could also add an else close to this conditional statement as 
follows on 2.0.0 which
+            is not possible on 1.2
+            <pre xml:space="preserve">&lt;filter 
source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
+        &lt;then&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address 
uri=&quot;http://localhost:9000/soap/SimpleStockQuoteService&quot;/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;then/&gt;
+        &lt;else/&gt;
+            &lt;log/&gt;
+        &lt;else/&gt;
+    &lt;/filter&gt;</pre></p>
           </subsection>
         </section>
     </body>


Reply via email to