org.jboss.soa.esb.actions
Class BusinessRulesProcessor

java.lang.Object
  extended by org.jboss.soa.esb.actions.AbstractActionLifecycle
      extended by org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
          extended by org.jboss.soa.esb.actions.ContentBasedWiretap
              extended by org.jboss.soa.esb.actions.ContentBasedRouter
                  extended by org.jboss.soa.esb.actions.BusinessRulesProcessor
All Implemented Interfaces:
ActionLifecycle, ActionPipelineProcessor

public class BusinessRulesProcessor
extends ContentBasedRouter

BusinessRulesProcessor extends ContentBasedRouter but does not perform any routing, it only executes the business rules.

Configuration Example:

<action class="org.jboss.soa.esb.actions.BusinessRulesProcessor" name="MyAction">
    <property name="ruleSet" value="OrderDiscountOnMultipleOrders.drl" />
    <property name="ruleReload" value="false" />
    <property name="ruleFireMethod" value="FIRE_ALL_RULES" />
    <property name="ruleAuditType" value="THREADED_FILE" />
    <property name="ruleAuditFile" value="/tmp/event" />
    <property name="ruleAuditInterval" value="1000" />
    <property name="ruleClockType" value="REALTIME" />
    <property name="ruleEventProcessingType" value="STREAM" />
    <property name="ruleMultithreadEvaluation" value="false" />
    <property name="ruleMaxThreads" value="1" />
    <property name="stateful" value="true" />
    <property name="defaultContinue" value="trur" />
    <property name="object-paths">
        <object-path esb="body.TheOrderHeader" />
        <object-path esb="body.TheCustomer" />
        <object-path esb="body.TheOrderStatus" entry-point="OrderStatusEntry" />
        <object-path esb="body.TheOrderInfo" entry-point="OrderInfoEntry" />
    </property>
    <property name="channels">
        <!-- chan1 and chan2 are equivalent (but timeout only applies if async == false) -->
        <send-to channel-name="chan1" service-category="cat1" service-name="svc1" />
        <send-to channel-name="chan2" channel-class="org.jboss.soa.esb.services.rules.ServiceChannel" service-category="cat1" service-name="svc1" async="true" timeout="30000" set-payload-location="org.jboss.soa.esb.message.defaultEntry" />
        <!-- a custom channel -->
        <send-to channel-name="chan3" channel-class="com.example.MyChannel" />
    </property>
</action>
As this class extends ContentBasedRouter please see its javadoc for configuration descriptions that are common to both classes. Property description:

Author:
John Doe, Daniel Bevenius

Field Summary
 
Fields inherited from class org.jboss.soa.esb.actions.ContentBasedRouter
_logger
 
Fields inherited from class org.jboss.soa.esb.actions.ContentBasedWiretap
_cbr, _cbrClass, _config, _destinations, _mapper, _messagePathList, _registry, _ruleLanguage, _ruleReload, _ruleSet, DEFAULT_CBR_CLASS, ENTRY_POINT, entryPointMap, messageMulticaster, OBJECT_PATH, OBJECT_PATH_TAG, ROUTE_TO_TAG
 
Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD
 
Constructor Summary
BusinessRulesProcessor(ConfigTree config)
           
 
Method Summary
 Message process(Message message)
          Inspect the content of the message using a rule set
 
Methods inherited from class org.jboss.soa.esb.actions.ContentBasedRouter
split
 
Methods inherited from class org.jboss.soa.esb.actions.ContentBasedWiretap
buildDestinationKey, checkMyParms, executeRules, initialise, routeMessage
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
processException, processSuccess
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionLifecycle
destroy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.soa.esb.actions.ActionLifecycle
destroy
 

Constructor Detail

BusinessRulesProcessor

public BusinessRulesProcessor(ConfigTree config)
                       throws ConfigurationException,
                              RegistryException,
                              MessageRouterException
Throws:
ConfigurationException
RegistryException
MessageRouterException
Method Detail

process

public Message process(Message message)
                throws ActionProcessingException
Inspect the content of the message using a rule set

Specified by:
process in interface ActionPipelineProcessor
Overrides:
process in class ContentBasedRouter
Parameters:
message -
Returns:
Message
Throws:
ActionProcessingException