The following methods support the use of strategies in activities.
- You can obtain the list of propositions that can be returned by the public component of a strategy through the Call Rule-Decision-Strategy.pyGetStrategyPropositions method. This method takes the following parameters:
- Name of the strategy rule
- Name of the results component (publicComponent parameter)
- Name of the page for the list of propositions
- Applies To class of the strategy
- You can obtain a list of properties that can be return by the public component of a strategy through the Call Rule- Decision-Strategy.pyGetStrategyProperties method. If found, duplicate values are ignored. This method takes the following parameters:
- Name of the strategy rule
- Name of the public component (publicComponent parameter). If the name of the public component is not provided, the method returns all properties used in strategy components. If the name of the public component is provided, the method returns properties of this component, including properties of other components in its execution chain.
- Name of the page for the list of properties
- Applies To class of the strategy
- Option to exclude referenced strategies
By default, all strategies in the execution chain are considered.
- You can obtain the list of segments that can be returned by the public component of a strategy through the Call Rule-Decision-Strategy.pyComputeSegmentLogic method. The segment logic computation goes through the chain of component connections, gathering information about segment components, and logical connections between them. If there is a sub strategy component involved, also segments of the sub strategy are gathered.
The results are represented in a tree structure that contains the resulting classes: Embed-AST (base class), Embed-AST-Operator-Boolean (logical operator and operands), Embed-AST-Constant-String (segment rule name). AND-nodes are generated for segment components in a sequence (for example, SegmentA component connects to SegmentB component). OR-nodes are generated for segment components that do not connect to each other, but instead connect to the same component (for example, SegmentA and SegmentB components connect to a strategy set) generated. The activity can be executed in the strategy results page, or you can provide the name of the strategy and Applies To class.
This method takes the following parameters:
- Name of the strategy rule
- Name of the components
- Name of the page for the result of computing the segmentation logic
- Applies To class of the strategy
About Strategy rules