Placing a trigger point in the application code

Before you begin

Before placing a trigger point, review the following topics:

Why and when to perform this task

The TriggerPoint class is the primary interface of the Business Rule Beans (BRBeans) Trigger Point framework. The class is used to transfer control to the Trigger Point framework to find and fire the rules specified in the application's trigger point.

Steps for this task

  1. Create an instance of the com.ibm.websphere.brb.TriggerPoint class. All rule triggers must be performed against an instance of this class. Also, set any desired strategies on the TriggerPoint instance.
  2. Gather together the parameters to be passed on the trigger.

    For the simple trigger() and triggerClassifier() methods this includes the following:

    An optional target object
    This can be used to specify an object that is to be the target of the rule's algorithm. Whether this is needed depends completely on the design of the rule implementor being used.
    The firing parameters for this rule trigger
    This is an array of run-time parameters needed by the rule to satisfy its business purpose. The exact set of required firing parameters is determined by the rule implementor that is used by the rule.

    Note: Any firing parameters defined on the rule itself will override whatever is passed here.

    Information identifying the rule or rules to be triggered
    Normally this is either a single String containing the name of the rule to be triggered or an array of Strings each element of which is the name of a rule to be triggered. However if a custom finding strategy is being used, this could be whatever information it needs in order to find the correct rules.

    The triggerSituational method differs in that it takes two sets of firing parameters and two sets of rule identification information: one set for the classifier rules and one for the classified rules.

  3. Invoke the trigger(), triggerClassifier(), or triggerSituational() method of the TriggerPoint instance. This will actually trigger the rule or rules.
  4. Process the results of the triggered rule or rules.

What to do next

Examples of how to code a trigger point call are provided in the following topics:

For a detailed description of the trigger point programming interfaces refer to the Trigger Point class in the BRBeans Javadoc.


Related concepts
Trigger point framework
Simple trigger point
Classifier trigger point
Situational trigger point
As Of Date
Related tasks
Developing BRBeans
Determining where to place a trigger point



Searchable topic ID:   tbrb_trghow
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_trghow.html

Library | Support | Terms of Use | Feedback