When-rule not being properly performed in precondition
A When-rule referenced in an activity step precondition is not being properly evaluated.
Error Messagescom.pega.pegarules.pub.clibpboard.InvalidParameterException: cannot be null/empty. page: MyWhenRule. Details: Invalid value for a Reference passed to com.pega.pegarules.data.intern . . .
Steps to ReproduceUse an expression similar to this in an activity step pre-condition:
(pyWorkPage.MyProperty==Primary.MyProperty) && MyWhenRule
Root CauseThe assembler is interpreting MyWhenRule in that expression as a page name instead of a when-rule.
Preconditions should either be When-rules or expressions but not a combination. Instead, use two pre-condition lines, as shown below.
ResolutionThe particular solution chosen was to replace the reference to MyWhenRule with the definition of MyWhenRule in the expression.
The drawback to this is that if the definition of MyWhenRule is changed later, the expression will need to be edited again.
User is suggested that two pre-condition lines be used, similar to the following logic:If (pyWorkPage.MyProperty==Primary.MyProperty) then continue else skip stepIf MyWhenRule then continue else skip step
Published July 15, 2016 - Updated July 29, 2016