Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Computing segment logic

Updated on April 5, 2022

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 RecordsTechnicalActivity.
  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 Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us