Support Article

Filter component does not take When rule in the filter condition

SA-27462

Summary



Issue with Filter component: Strategy does not map When rule in filter condition.

Error Messages



Instance of class Rule-Obj-When not found: Org-XYZ-SR-Sales-Handsets.MyWhen

Steps to Reproduce

  1. Create a When rule defined in the same class as that of the Strategy class.
  2. Map this When rule in the filter condition of the filter component.

Root Cause



Validation for @When was enabled between Pega 7.1.9 and Pega 7.2. In DSM, When rules were evaluated in the wrong context.

Resolution



Use any one of the following options instead of @when:
  • Recommended: Use the Proposition Filter component that allows usage of When rules without specific syntax or function calls.
  • Use @callWhen instead of @when in the filter component, for example: @callWhen (tools, <WhenRule>, Primary). This is useful when the primary page of the When differs from the current primary page.

Published August 31, 2016 - Updated September 16, 2016

Have a question? Get answers now.

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