Class Association Rules for Reporting
Has anyone had success using class association rules? Nothing that I do gets the association to actually show up as available in the report, at dev time. I've looked up the article at https://community.pega.com/sites/default/files/help_v83/procomhelpmain.htm#/express/rule-/rule-obj-/rule-obj-association/main.htm and it does not offer much help. From what I can tell, the "When and how to create an association rule to support reporting" does not exist.
Hey Ron, so this is really interesting. The magic to all of this, the thing that isn't defined anywhere, and that I was really struggling with, is that you have to add the association name in to Pages and classes tab. Associations don't automatically get added to the report definition data access tabs, and they aren't automatically available to be referenced by the report definition. You have to specifically add the association name and the corresponding join's class to the report definition's pages and classes tab
So, to make this all work...
- Create an association rule. The name of the association rule must match the prefix of one of the class joins. This is necessary to get the association rule to save.
- Add to pages and classes of the report definition, a page that is named the same as your association rule...the one that is also defined as a join condition
- As soon as you do this, you can then reference that association name in your displayable columns, at which point, the association is finally added to the report definition's data access tab.
No documentation seemed to truly point me in the right direction as to how this is intended to be configured. My assumption, and it was wrong, was that as soon as an association rule is created, if you create a new report definition, that association rule would automatically, and immediately be defined in the data access tab. I feel like an SR is a little heavy handed, but I think that it would be very beneficial to get this documented a little more. All documentation that I was able to find, seemed to be from back in the 5.4 days, and maybe things have changed.
I intend to make use of association rules, as a way to make common framework level report definitions not have to be specialized at our implementation level. For example, if I define a report definition at the Assign-WorkBasket class, and it joins to SomeFramework-Work class, there is no way to make that report definition work on my SomeImplementation-Work work class, unless I specialize that report definition to join specifically on the implementation class. Reporting on descendants only applies to the class that the report definition is defined in, not the class of any joins. In theory, I can instead, create an association at the framework level, make the framework level report definition use the association, and then simply override the association in my implementation. If I've got 50 reports that join to the same framework class, this would allow me to specialize a single association rule, whereas without this, I would have to update all 50 reports. Maybe when I do this, I will take some screenshots, and send over an SR for updating documentation on this rule type.
Keep up to date on this post and subscribe to comments
- Difference between Class Join and Associations under Data Access Tab in Report Definition.
- Association Multiple class joins not getting in report drop down
- Associations rule in Report definition
- Can some one tell me difference between Association rule and joins in Reports.
- Unable ot associate NPS survey class as direct parent to my application class.