Table of Contents

Computing segment logic


Only available versions of this content are shown in the dropdown

Use the Call instruction with the Rule-Decision-Strategy.pyComputeSegmentLogic activity to obtain the list of segments that can be returned by the strategy. The segment logic computation goes through the chain of component connections, gathering information about segment components and logical connections between them. If a substrategy component is involved, segments of the substrategy are also gathered. The result is represented in a tree structure that contains the resulting classes: Embed-AST (base class), Embed-AST-Operator-Boolean (logical operator and operands), Embed-ASTConstant-String (segment rule name). The method generates the following nodes:

  • AND-nodes for segment components in a sequence (for example, SegmentA component connects to SegmentB component).
  • OR-nodes for segment components that do not connect to each other, but connect instead to the same component that is generated (for example, SegmentA and SegmentB components connect to a set property component).

You can run the activity in the strategy results page or you can provide the name of the strategy and the class.

  1. Create an instance of the Activity rule in the Dev Studio navigation panel by clicking Records Technical Activity .

  2. In the activity steps, enter the Call Rule-Decision-Strategy.pyComputeSegmentLogic method.

  3. Click the arrow to the left of the Method field to expand the method and specify its parameters:

    • Name of the strategy component from which you want to get list of segments

    • Name of the strategy

    • Name of the page to hold the result of computing the segmentation logic

    • Strategy class

  4. Click Save.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.