I’m having trouble deleting a property from a Data Model. I created a property of type text and calculated type. Therefore, a declare expression was created. When I try to delete this property from the Data Model, only the declare expression is deleted; the property itself remains, but it’s no longer of type calculated, but I can’t delete it. When I try to delete it not from the Data Model but as a rule, I get the following error: “This property is used as a Target in the Rule-Declare-Expressions instance(s) Please delete the instance(s) before you delete this property.”
Any ideas on what might be happening? It’s not detecting that the declare expression no longer exists.
Can you please confirm whether this is in Blueprint or in App Studio ?
I have just tried to replicate your issue in the Blueprint and it is allowing me to delete property marked as calculated without any issue.
@HalynaK2 I have tried the same scenario in 24.2.1.
Performed below steps as per your question,
Created a branch in the application and enabled branch development
Created a new property from App Studio > Case Type > Data Model
Checked the branch in Dev Studio and I see a new Property along with Declare expression rule. Additionally, pega will also Create case type, Report Definition, Localization and Paragraph rules updating this new property in according rules related to the case type.
Deleted the property using delete icon from App Studio > Case Type > Data Model
Went back to Dev Studio and checked the branch and noticed that only property and declare expression rules got deleted. Rest of the other rules are still intact.
I have seen the expected behaviour and pega expects you to cleanup the rest of the rules accordingly if they are not needed.
Hope you have followed the above steps. As you mentioned you are using 24.2.3 which is a higher version than mine, the above behaviour should be the same for you as well.
It could be that the other rules which are still existing, are still referring to your non-existing property and might be causing issue for you. Delete them as well and try again. Better try creating a new branch just for that new property and see for yourself what are rules are getting generated.
General Note: Whenever you are working on branches in pega, ensure that you maintain a separate branch for the functionalities you are working as POC or requirements which are still unsure of. This enables you to cleanup easily by deleting the whole branch so that all the rules related to your functionality are cleaned up gracefully.
Thank you very much for your response. The problem was that another developer had the declare expression in private edit. That’s why I couldn’t delete the property. Even though the declare expression was removed, it still had the reference to private edit.