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
<then> element.</p>
- <!--todo: sample-->
+ <p>If we consider the following sample from the 1.2 version of
synapse;
+ <pre xml:space="preserve"><filter
source="get-property('To')" regex=".*/StockQuote.*">
+ <send>
+ <endpoint>
+ <address
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+ </endpoint>
+ </send>
+ <drop/>
+ </filter></pre>
+ the equivalent configuration for the 2.0.0 release is going to be;
+ <pre xml:space="preserve"><filter
source="get-property('To')" regex=".*/StockQuote.*">
+ <then>
+ <send>
+ <endpoint>
+ <address
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+ </endpoint>
+ </send>
+ <drop/>
+ <then/>
+ </filter></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"><filter
source="get-property('To')" regex=".*/StockQuote.*">
+ <then>
+ <send>
+ <endpoint>
+ <address
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+ </endpoint>
+ </send>
+ <drop/>
+ <then/>
+ <else/>
+ <log/>
+ <else/>
+ </filter></pre></p>
</subsection>
</section>
</body>