OOTB function pxDoesHandleExist fails if parameter passed is not a valid handle
The built-in pega function 'pxDoesHandleExist' returns 'true' if the handle exists, as expected.
However, if the parameter passed is 'garbage,' for example - the function fails rather than returning 'false' - with the message "
Class GARBAGE does not exist
This does not fit with the use case given in the help file - where this function is meant to be used as a precondition for obj-open-by-handle so we can avoid trying to open a nonexistent instance of a rule.
Screenshot attached, please advise.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
I finally got around to opening a ticket with Pega Support - SR-C37427. - and they gave me a fix that worked well.
Basically we return false when the database exception is thrown by the call to doesInstanceExist() - rather than propagate the exception up.
Note that because a hotfix was not provided, I had to change the name of the function and save it in our custom library.
Keep up to date on this post and subscribe to comments
- Authentication failed because the constructed Data-Admin-Operator-ID instance failed to pass validation
- LDAP2 Authintication Authentication failed because the constructed Data-Admin-Operator-ID instance failed to pass validation.
- Pass Parameter to message from Validate Rule
- I'm using a when rule with params in Validate rule. How can I pass the parameter values?
- Is there any OOTB function to get embedded pageList if we give parent page as parameter?