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
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.
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.