Author: indika Date: Tue Jun 30 01:06:17 2009 New Revision: 40377 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=40377
Log: update rule mediator doc Modified: branches/esb/java/2.1/product/docs/xdoc/mediators/rule.xml Modified: branches/esb/java/2.1/product/docs/xdoc/mediators/rule.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/rule.xml?rev=40377&r1=40376&r2=40377&view=diff ============================================================================== --- branches/esb/java/2.1/product/docs/xdoc/mediators/rule.xml (original) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/rule.xml Tue Jun 30 01:06:17 2009 @@ -302,8 +302,7 @@ RuleSession. Figure 3 shows UI on adding property. </p> <p><img alt="Property Adding" -src="../rule-mediator/docs/images/rule_mediator_property.JPG" /> width="717" -height="64"> </p> +src="../rule-mediator/docs/images/rule_mediator_property.JPG" /> </p> <p>Figure3: Rule Mediator Properties</p> @@ -314,5 +313,31 @@ <p><strong>Action</strong>: Delete the property </p> <p></p> + +<h3>Example</h3> +<ol> + <li><pre><rule> + <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> + <ruleSource key="rule/sample.xml"/> + <input name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples" type="string"/> + </configuration> + <childMediators> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + <drop/> + </childMediators> +</rule> + </pre> + In the above configuration, Rule script is picked from the registry with + key <strong>rule/sample.xml</strong>. There is a one <strong>input</strong> + and it is a string variable. Its value is calculated from the current SOAP + message using an expression. These inputs are data to the Rule engine. Rule + engine uses inputs to decide what rules should fire. </li> +</ol> + +<p></p> </body> </html> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
