We've observed a frowning face icon upon completion of the Merge operation. In this post, I am sharing the root cause and how to prevent this from happening.
1. Create a branch and associate it with your application. Also create a ruleset for unit testing.
2. Create a test case rule using PegaUnit testing. Enter more than 255 characters in the Description field as below. In this example, I entered 256 characters. Make sure the rule is saved into a Branch ruleset for unit testing.
3. Merge this branch into a primary ruleset. For the simplicity, I am only merging a single rule.
4. Click "Merge" button.
5. Frowning face icon appears as below with an error message, "Failed to complete merge - see errors below." However, no message is shown on screen.
The problem is, system does not print any failure logs in the PegaRULES log files. Actually it does not log a regular INFO log as well (I am raising an enhancement request for this). The rule instance seems to be moved to the primary ruleset correctly, but we weren't sure if this is something we need to care or not.
After an investigation, we have figured if the length of the description in test case rule is more than 255 characters, this frowning face icon shows up. Per our regression test, there doesn't seem to be an actual harm by this frowning face icon, but if you don't want to see it, it is advised to make the description shorter than 256 characters. We've verified alpha numeric / multibyte characters don't matter - you can also type Japanese characters up to 255. You can use Microsoft Word to count the number (be noted, take the number from "Space included"). Also we verified this issue does not happen in Usage or Description in regular rule type - this is a PegaUnit testing specific problem.
After making description less than 256 characters, you should be able to see a smiley face icon.
We have also found out other scenarios that frowning face appears on completion of Merge wizard. Without logs, it was very hard to figure out the pattern but our team has conducted dozens of testing to find out below conditions. For example, if you create a Validate rule "ValidatePurchaseItem" (20 characters) under "MyCo-MyApp-Work-PurchaseRequest" class (31 characters), it fails as the sum of two strings is greater than 50. However, these rules are actually moved into the primary ruleset correctly and they work fine. I would say this frowning face is caused by Merge wizard's overreaction.
If the rule ID is greater than 32 characters, Merge wizard fails.
If the rule ID is greater than 44 characters, Merge wizard fails.
If the sum of the rule ID and class is greater than 50 characters, Merge wizard fails.
***Edited by Moderator: Pooja Gadige to add capability tag***
***Edited by Moderator Marissa to update Support Case Details***