You are here: Reference > Activity methods > Call another activity > Computing segment logic

Computing segment logic

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:

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 by clicking Records Explorer > 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:

  4. Click Save.