Change the root entity of a rule
About this task
The intent of the Rules editor Change Root Entity menu command is to enable you to edit a rule that you otherwise cannot open in Studio. This can happen, for example, if PolicyCenter is unable to parse the rule declarations. Do not use this command in any other circumstances.
Procedure
- Select a rule within a rule set.
-
Right-click the rule name and select
Change
Root Entity from the drop-down menu.
Studio prompts you for an entity name.
- Enter the name of the new root entity.
Results
After you complete this command:
- Studio performs a check to verify that the provided name is a valid entity name.
- Studio replaces occurrences of the old entity in the function declarations of all the files in the rule set with the new entity. This replacement only works, however, if the old root type is an entity.
- Studio changes the name of the entity instance passed into the condition and action of each rule.
- Studio does not propagate the root entity change to the body of any affected rule. You must correct any code that references the old entity manually.
What to do next
See also
