Administering strategy objects to control triggers

Why and when to perform this task

Strategy objects are used to alter TriggerPoint functions. The two simple trigger methods, trigger() and triggerClassifier(), perform their function in the following sequence:

Steps for this task

  1. Find the rules.
  2. Filter out those rules which are not desired.
  3. Fire the remaining rules.
  4. Combine the results and return to the caller.

Results

The complex trigger method triggerSituational() does this sequence of steps twice; the first sequence finds the classification to feed into the second sequence.

Default strategy objects already are defined for each of the four TriggerPoint steps and they are used if none are specified explicitly. For each of these steps, there are at least two strategy objects used, one for triggering classifier rules, and one for triggering non-classifier rules. For the filtering step, there are actually three pairs of strategies that are used, based on the number of rules which the finding strategy returns (zero, one, or multiple).

While the sheer number of strategies that are available can be intimidating (twelve different strategy classes can be set), very few will need updating. Most users will modify the filtering strategies or the combining strategies only.

A number of predefined strategy objects are provided and can be used for the majority of cases. Although the following strategies are described separately, they have a definite dependency on each other. For example, the FilteringStrategy filters rules from the FindingStrategy; the FiringStrategy uses the results of the FindingStrategy to operate; and the CombiningStrategy depends on the results of the FiringStrategy.

FindingStrategy
The FindingStrategy accesses the data store and returns those rules that meet the search criteria specified. See the FindingStrategy method for more information.
FilteringStrategy
The FilteringStrategy takes the list of rules that were found by the FindingStrategy and filters out the rules that should not be fired. See the FilteringStrategy method for more information.
FiringStrategy
The FiringStrategy takes the rules that were found by the FindingStrategy, (possibly modified by the FilteringStrategy), fires them each in order, and returns an array containing the results of each rule. See the FiringStrategy method for more information.
CombiningStrategy
The CombiningStrategy takes the results of the rules that are fired by the FiringStrategy and combines them to form a reasonable result to the TriggerPoint caller. See the CombiningStrategy method for more information.
The Java classes for these strategy objects are defined in the com.ibm.websphere.brb.strategy package. Static constants also are defined in the interfaces for the various strategies. This allows easy access to instances of the strategy classes to set them on the TriggerPoint.

Also, it is possible to write your own strategy class if the supplied ones do not perform the function you need. See Customized strategy objects for more details.


Related concepts
FindingStrategy method
FilteringStrategy method
FiringStrategy method
CombiningStrategy method
Customized strategy objects
Related tasks
Developing BRBeans
Determining where to place a trigger point
Placing a trigger point in the application code



Searchable topic ID:   tbrb_strat
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/brb/tasks/tbrb_strat.html

Library | Support | Terms of Use | Feedback