Custom family-level and field-level rules can be stored in two places:
Storing family rules within the family rule project itself means that the actual rule code is stored in the family and field classes within a family rule project. This form of rule code storage is acceptable but can be cumbersome as it can result in a large amount of rule code that must be maintained on a family-by-family basis. In addition, rule code that is stored within family rule projects applies only to one family. To apply the same rule code to another family, you would have to copy the rule code and paste it into another family rule project.
The Rules Library, on the other hand, stores rule code in projects that can be referenced from family rule projects. In this way, you can store the actual VB.Net code in one central location and then apply it to multiple families. This method of rule code storage offers many advantages, including limiting the amount of code that must be maintained and increasing the ease and efficiency with which that code can be applied to other families.
The Rules Library, however, also imposes some limitations. To take advantage of the exact same rule code across multiple families, you would need to have multiple families that should behave exactly the same way. It is more likely, however, that you will have multiple families that should behave in similar ways.
For this reason, you will probably want to use a combination of the two rule code storage methods. In the Rules Library, you can store code that will serve as the foundation on which family-level and field-level rules are built. After referencing that code from a family rule project, you can extend the rule through family-level and field-level customization.
Copyright © 2018 General Electric Company. All rights reserved.