Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Creating advanced associations between classes

Updated on August 31, 2020

Improve the functionality of the class association feature by providing users with advanced options for creating complex associations between classes. For example, you can associate two classes whose properties do not share a common value by joining them with a separate class to fetch the data from all three classes.

For example, when you associate the Work- and the Data-Admin-OrgUnit classes, you can define a corresponding join between them by adding the Assign-Worklist class to the association. Advanced associations provide the option to join the Work- class with the Assign-Worklist class, and then the Assign-Worklist class with the Data-Admin-OrgUnit class.
Before you begin: Create an association record by following steps 1 through 2 in Creating simple associations between classes.
  1. In Dev Studio, at the top of the New tab, click Convert to advanced configuration, and then confirm the conversion by clicking Submit.
  2. In the Class association section, in the Class name field, specify the class that you want to associate with the context class.
    You specify the context class in the Apply to (class) field when you create an association record.
  3. Create a class join between classes:
    1. In the Class join section, click Add class join.
    2. In the Prefix field, enter a short alias for the class that you want to join with the context class.
      The prefixes help the system to distinguish between classes and ensure that classes are joined accurately.

      For example, enter A.

    3. In the Class name field, enter the class that you want to join with the context class.
    For example: Enter Assign-Worklist.
    1. Click Edit conditions.
    2. In the Column field, enter the prefix of the class that you want to join, and then specify any property of that class.
      For example, if you set the prefix as A, enter A.pyLabel.
    3. In the Value field, enter a property of the context class, and click Submit.
      Result: The system creates a join between the context class and the Assign-Worklist class.
  4. If your association is complex, and requires more than one join to fetch the required data, create additional joins by repeating step 3 to create a connection between the context class, and the secondary class.
    For example: Associate the Assign-Worklist class with the Data-Admin-OrgUnit class to fetch data from the context class and the targeted Data-Admin-OrgUnit class.
  5. In the Type list, select the type of join to use.
    For example, select Only include matching rows to include rows that contain common data for both classes.
  6. In the upper-right corner of the New tab, click Save.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us