Question
On creation, Pega renames Rule-Utility-Function with generated hex string
Summary
I am creating a couple of Rule-Utility-Functions. In some instances, Pega is renaming my functions in a ghastly fashion (see below). I don't see a workaround.
The plea for help
- Has anyone dealt with this?
- Is there a hotfix?
- Moderators, please let me know if I should be opening an SR instead.
Details
When I first create a Rule-Utility-Function, if it has a long name and some parameters, Pega renames it with what appears to be an automatically generated Hex string. For example:
- create a new Function
- for label, enter "this is a long function name with some parameters"
- add three string parameters
- p1, String
- p2, String
- p3, String
- click to create the rule
Result: the function is created with the name
ThisIsALongFunctionNameWithSom--70c85b9d0d10cb9ff641f6221070cf00
Egads!
The apparent cause
On creation, Pega ordinarily attempts to generate a helpful label by concatenating
- the value I supply
- two hyphens as a separator
- a comma-separated list of parameter types
For the example above, Pega would generate the following label:
ThisIsALongFunctionNameWithSomeParameters--(String,String,String)
Summary
I am creating a couple of Rule-Utility-Functions. In some instances, Pega is renaming my functions in a ghastly fashion (see below). I don't see a workaround.
The plea for help
- Has anyone dealt with this?
- Is there a hotfix?
- Moderators, please let me know if I should be opening an SR instead.
Details
When I first create a Rule-Utility-Function, if it has a long name and some parameters, Pega renames it with what appears to be an automatically generated Hex string. For example:
- create a new Function
- for label, enter "this is a long function name with some parameters"
- add three string parameters
- p1, String
- p2, String
- p3, String
- click to create the rule
Result: the function is created with the name
ThisIsALongFunctionNameWithSom--70c85b9d0d10cb9ff641f6221070cf00
Egads!
The apparent cause
On creation, Pega ordinarily attempts to generate a helpful label by concatenating
- the value I supply
- two hyphens as a separator
- a comma-separated list of parameter types
For the example above, Pega would generate the following label:
ThisIsALongFunctionNameWithSomeParameters--(String,String,String)
However, that would exceed the max length of pyLabel by one character, so Pega cannot modify the label as intended. To use a technical term, it barfs - Pega does something completely unexpected: it modifies both the label and the name of the rule like this:
ThisIsALongFunctionNameWithSom--70c85b9d0d10cb9ff641f6221070cf00
- The label problem is this is annoying but has a workaround: change the label value and save again
- The rulename problem has no workaround other than to shorten the name of the function. For a function with a longer list of parameters, there is no workaround. To demonstrate this, I attempted to create a function with a one-character name, A, and enough parameters to exceed the length limit of pyLabel. Pega created this:
A--(ClipboardProperty,ClipboardPa6aa01df9cbc99c5e6dc4397862b6de7
Disclaimer: although I could hypothetically use such a function, I could not live with myself if I introduced one into the application. <insert whimsical emoji here>