Support Article

contains function not working with <current> as one of the param

SA-37802

Summary



The user migrated from 7.1.7 to 7.1.9,contains function used in 7.1.7 is not working in 7.1.9 and showing a compile time error.


Error Messages



Test compilation failed: ----------
1. ERROR in /Rule_Declare_DecisionTable_MGL_FW_LeaseFW_Data_AC_ApprovalConditionList_ApplicationProfilesNonAutomatic_Action_20170406T015437_691_GMT.java (at line 1741)
boolean pz_14 = pega.<java.lang.Boolean>resolveMethodCall("contains--(String,String)", "contains", "Pega-RULES", "String", new Object[]{pega.getStringValueViaPropRef(".LeaseApplication.ApplicantTypes", pRef_13, myStepPage, false, false, true), currentProperty.getStringValue()});
^^^^^^^^^^^^^^^
currentProperty cannot be resolved
----------
1 problem (1 error)
Compile failed.

Attached error screen shot


Steps to Reproduce


  1. Create Decision Table
  2. Use @(Pega-RULES:String).contains(Test,<current>) function in one of the column
  3. Save the rule


Root Cause



<current> is not supported in 7.1.9

Resolution



Need to use <current-value> instead of <current>

Published May 11, 2017 - Updated May 28, 2017


100% found this useful

Have a question? Get answers now.

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