Question
375008155608
US
Last activity: 3 Dec 2019 11:02 EST
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.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 22 Nov 2019 22:26 EST
375008155608
US
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...
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.
Pegasystems Inc.
US
Hi Jerome
Perhaps, this is the link you were looking for-
375008155608
US
Do you know if there is any documentation as to how you get the associations to populate in the report definition rule? I've tried creating several variations of association rules and they never show up in the necessary report definitions. Maybe I need to create an SR?
Pegasystems Inc.
US
Here's the URL of the article you are looking for:
Accepted Solution
Updated: 22 Nov 2019 22:26 EST
375008155608
US
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...
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.
Pegasystems Inc.
US
Hi Jerome,
I don't think Design Studio automatically adds entries to Pages & Classes for Sub-reports either. I'm not sure why not, but it certainly wouldn't hurt to mention the requirement in the help page.