![]() |
A trigger point is simply the location in a method of an object at which externalized business rules are invoked. Proper placement of trigger points can add substantially to the flexibility and speed with which a business application adapts to new business practices.
Wherever a trigger point is placed in user-written code, the BRBeans trigger point framework needs to do the following:
The application code that contains the trigger point needs to perform the following functions:
RuleImplementor
.fire
method of the RuleImplementor
.
If firing parameters are specified on the rule itself, then those firing parameters
are passed instead of the ones passed by the caller.trigger(), triggerClassifier(),
or triggerSituational()
method
of the TriggerPoint
class.The two simple trigger methods, trigger
and triggerClassifier
,
perform their function in four steps:
The complex trigger method, triggerSituational
does this
sequence of steps twice, the first step to find the classification which
is fed into the second step. The second step triggers rules which have the
classification equal to the value returned in the first step.
How each of these steps is performed can be modified through various methods on the TriggerPoint object. The implementation of each step is defined by a strategy object. For more information on strategies, see Using strategy objects to control triggers.
Related tasks... | |
How to place a trigger point | |
Related concepts... | |
Determining where to place a trigger point | |
Types of Trigger Points - overview | |
View PDF file... | |
To view a PDF file containing this article and related articles, click: | |
![]() | |