Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

When-rule not being properly performed in precondition

SA-25671

Summary



A When-rule referenced in an activity step precondition is not being properly evaluated.

Error Messages



com.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 Reproduce



Use an expression similar to this in an activity step pre-condition:

 
(pyWorkPage.MyProperty==Primary.MyProperty) && MyWhenRule
 


Root Cause



The 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.

Resolution



The 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 step
If MyWhenRule then continue else skip step
 

 

Published July 29, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us