Constructing Decision Table Actions

In NPDRules, see the _DefineDTblActions( ) method in the Examples class. Notice that the argument of this method (an array of pointers to ActionData) is an input to the InitRuleData( ) method just as in _DefineDtblConditions( ). In this method, instances of the ActionData are created, each of which represents an Action of a decision table. Pointers to these instances are saved in an array, which serves as the method's output argument.

Thus, the process of defining a non-persistent decision table Action is quite similar to the process of defining a Condition. In particular, an instance of the DIMember class must be created and an instance of ActionData must point to that DIMember instance. The only difference between the two processes is that three types of Actions that can be specified for a decision table. These actions are:

Aion provides constants that specify the type of action. In NPDRules, see the SetActionType( ) method in the ActionData class that is used to define an ActionData instance as supporting a particular type of action.

In particular, for all Action types, the number of Action selectors must exactly equal the number of decision table outcomes. If the decision table has six possible outcomes, each Action must specify exactly six selectors. There are no "defaults" if fewer selectors are specified.


Copyright © 2009 CA. All rights reserved. Send E-mail to CA about this topic