[jboss-svn-commits] JBL Code SVN: r20527 - in labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss: soa/esb/actions and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jun 16 08:49:08 EDT 2008
Author: beve
Date: 2008-06-16 08:49:08 -0400 (Mon, 16 Jun 2008)
New Revision: 20527
Modified:
labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java
labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/BusinessRulesProcessor.java
labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java
labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java
Log:
Updated javadocs
Modified: labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java 2008-06-16 11:51:42 UTC (rev 20526)
+++ labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/JBossRulesRouter.java 2008-06-16 12:49:08 UTC (rev 20527)
@@ -39,34 +39,6 @@
* <p/>
* We keep a HashMap of so called working memories for performance reasons.
* <br><br>
- * Usage:
- * <pre>{@code
- *
- * <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
- * <property name="ruleSet" value="FunCBRRules-XPath.drl"/>
- * <property name="ruleLanguage" value="XPathLanguage.dsl"/>
- * <property name="ruleReload" value="true"/>
- * <property name="destinations">
- * <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" />
- * <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" />
- * <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" />
- * </property>
- * </action>
- *
- * }</pre>
- *
- * Optional properties
- * <pre>{@code
- * <property name="stateful" value="true"/>
- * <property name="dispose" value="true"/>
- * }</pre>
- *
- * Property descriptions:
- * <lu>
- * <li>stateful - if true Drools will execute using a StatfulSession. Default is false
- * <li>dispose - only valid if stateful is true if true Drools will execute using a StatfulSession. Default is false
- * </lu>
- * <br>
* @author kstam at redhat.com
*
*/
@@ -148,14 +120,7 @@
Map<String,Object> globals = new HashMap<String,Object>();
List<String> destinations = new ArrayList<String>();
globals.put( "destinations", destinations );
- RuleServiceCallHelper.executeStateFulRulesService(
- ruleSet,
- ruleLanguage,
- ruleReload,
- message,
- objectList,
- globals,
- configTree );
+ RuleServiceCallHelper.executeStateFulRulesService( ruleSet, ruleLanguage, ruleReload, message, objectList, globals, configTree );
return destinations;
}
catch (final RuleServiceException e)
Modified: labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/BusinessRulesProcessor.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/BusinessRulesProcessor.java 2008-06-16 11:51:42 UTC (rev 20526)
+++ labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/BusinessRulesProcessor.java 2008-06-16 12:49:08 UTC (rev 20527)
@@ -41,8 +41,34 @@
import org.jboss.soa.esb.services.routing.MessageRouterException;
/**
- * BusinessRulesProcessor
+ * BusinessRulesProcessor extends {@link ContentBasedRouter} but does not perform any routing, it only
+ * executes the business rules.
+ * <p/>
*
+ * Configuration Example:
+ *<pre>{@code
+ *
+ *<action class="org.jboss.soa.esb.actions.BusinessRulesProcessor" name="YourCBRName">
+ * <property name="ruleSet" value="OrderDiscountOnMultipleOrders.drl" />
+ * <property name="ruleReload" value="false" />
+ * <property name="stateful" value="true" />
+ * <property name="object-paths">
+ * <object-path esb="body.TheOrderHeader" />
+ * <object-path esb="body.TheCustomer" />
+ * </property>
+ *</action>
+ *
+ * As this class extends {@link ContentBasedRouter} please see its javadoc for
+ * configuration descriptions that are common to both classes.
+ *
+ * Property description:
+ * <lu>
+ * <li> <i> class </i> action class, org.jboss.soa.esb.actions.BusinessRulesProcessor
+ * <li> <i> stateful </i> Optional property which tells the RuleService to use a stateful session where facts will be remembered between invokations.
+ * </lu>
+ * </br>
+ *
+ *
* @author John Doe
* @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*
Modified: labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java 2008-06-16 11:51:42 UTC (rev 20526)
+++ labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedRouter.java 2008-06-16 12:49:08 UTC (rev 20527)
@@ -28,10 +28,16 @@
import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.services.routing.MessageRouterException;
/**
- * The CBR action that drives the CBR implementation dynamically.
+ * ContentBasedRouter implements the Content Based Routing pattern.
+ * It routes a message to one or more destination services based on the message content
+ * and the rule set it is evaluating it against.
+ * <p/>
+ * For configuration details see
*
* @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
* @author kstam at jboss.com
+ *
+ * @see ContentBasedWiretap
*
*/
public class ContentBasedRouter extends ContentBasedWiretap
Modified: labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java 2008-06-16 11:51:42 UTC (rev 20526)
+++ labs/jbossesb/workspace/dbevenius/ruleservice/product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/ContentBasedWiretap.java 2008-06-16 12:49:08 UTC (rev 20527)
@@ -44,10 +44,54 @@
import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouterFactory;
/**
- * @author <a
- * href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * ContentBasedWirtap implements the WireTap pattern.
+ * The WireTap is an Enterprise Integration Pattern (EIP) where a copy of the message is
+ * sent to a control channel. The CBRWT is identical in functionality to the ContentBasedRouter,
+ * however it does not terminate the pipeline which makes it suitable to be used as a WireTap.
+ * <p/>
+ *
+ * Configuration Example:
+ *<pre>{@code
+ *
+ *<action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="OrderDiscountBasedOnCustomerHistory">
+ * <property name="ruleSet" value="OrderDiscountOnMultipleOrders.drl" />
+ * <property name="ruleReload" value="false" />
+ * <property name="stateful" value="true" />
+ * <property name="object-paths">
+ * <object-path esb="body.TheOrderHeader" />
+ * <object-path esb="body.TheCustomer" />
+ * </property>
+ * <property name="destinations">
+ * <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" />
+ * <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" />
+ * <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" />
+ * </property>
+ *</action>
+ *
+ * }</pre>
+ * Property description:
+ * <lu>
+ * <li> <i>class</i> action class, one of : org.jboss.soa.esb.actions.ContentBasedRouter, org.jboss.soa.esb.actions.ContentBasedWireTap,
+ * or org.jboss.soa.esb.actions.MessageFilter
+ * <li> <i>ruleSet</i> Name of the filename containing the Drools ruleSet.
+ * <li> <i>ruleLanguage</i> Optional reference to a file containing the definition of a Domain Specific Language to be used for evaluating
+ * the rule set.
+ * <li> <i>ruleReload</i> Optional property which can be to true to enable 'hot' redeployment of rule sets.
+ * <li> <i>stateful</i> Optional property which tells the RuleService to use a stateful session where facts will be
+ * remembered between invokations.
+ * <li> <i>object-paths</i> Optional property to pass Message objects into Rule Services WorkingMemory.
+ * <li> <i>desitinaions</i> A set of routeto properties each containing the logical name
+ * of the destination along with the Service category and name
+ * as referenced in the registry. The logical name is the name
+ * which should be used in the rule set.
+ * </lu>
+ * </br>
+ *
+ *
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
* @author kstam at jboss.com
* @author kevin.conner at jboss.com
+ * @author <a href="mailto:dbevenius at redhat.com">Daniel Bevenius</a>
*/
public class ContentBasedWiretap extends AbstractActionPipelineProcessor {
More information about the jboss-svn-commits
mailing list