Associations

Use an association to define a relationship between two classes based on matching values in pairs of properties. Associations are typically used to enable your application to automatically add a join to a report that displays properties from both classes referenced in the association.

For example, the association pxAssignedOperatorInfo defined in Work- relates each instance to an assignment instance in Assign- by comparing pxAssignedOperatorID in Work- to pyUserIdentifier in Assign-. These relationships are inherited by descendent classes of the classes on which the association is defined; in this example, all descendent classes of Work- and Assign-. Associations are used in report definitions to allow a report to contain data from both the instances of the Applies To class and the joined or associated class.

Associations can be simple or advanced. Use a simple association under the following conditions; otherwise, use an advanced association.

  • The join is to only one class.
  • The join type is left outer.
  • The join condition has only one filter.

Associations are one-directional, and only apply when the primary class of a report definition rule is the same as, or is a descendent of, the primary class of the association. You can define more than one association between two classes, if there are multiple ways of relating or joining instances of the two classes.

To represent the relationship between two classes A and B, you usually need to define two associations:

  • An association where the Applies To key part is A, which associates data instances in B to those in A.
  • An association where the Applies To key part is B, which associates data instances in A to those in B.

For more information, see the Pega Community article When and how to create an association rule to support reporting.