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 there is a sub strategy component involved, also segments of the sub-strategy 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:

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 selecting Activity from the Technical category.

  2. In the activity steps, use 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.