Building Workflows with Activities & Tables in pega

Activity and Tables in Pega

Pega empowers you to build powerful and automated workflows with the combined strength of Activities and Tables. This option uses “serve as” to highlight the role of activities and “its” to clarify the connection to the workflow. Tables, on the other hand, provide the foundation for data storage and manipulation. Consequently, by harnessing these functionalities together, you can streamline complex tasks, automate processes, and gain valuable insights from your data.  Now that we’ve explored the potential of Activities and Tables in Pega, this introduction paves the way for a more in-depth exploration.

If we want to communicate with Tables, we can use activity methods.

Basic methods :

Obj-Browse: So, This method is used to fetch multiple instances from a table. The Data Structure is a Page List and data is Read only. This option uses “serve as” to highlight the role of activities and “its” to clarify the connection to the workflow. Tables, on the other hand, provide the foundation for data storage and manipulation. Consequently, by harnessing these functionalities together, you can streamline complex tasks, automate processes, and gain valuable insights from your data. Having established the potential of Activities and Tables in Pega, this introduction serves as a springboard for a more in-depth exploration.

Obj-Open: This method fetches a single instance based on the Class key.

Obj-Open-By-Handle: This method fetches a single instance based on the Primary key (PzInskey).

Obj-save : This method can be used to insert or update an instance.

Obj-Delete : To delete instances from table.

Obj-Delete-By-Handle : To delete based on primary key (pzInskey)..

Moreover, When we use these methods PRPC auto generates, SQL Queries.

However, If you want to access physical tables of any DB from PRPC, we need Class Name Parameter to be passed.

Understanding Obj-Browse :

Building Workflows with Activities & Tables in pega
Building Workflows with Activities & Tables in pega

Objclass : The Table Class.

Page Name: The data fetched will be placed on clipboard on the specified page.

Bottom State code or Stat name are selected and “where clause parameters”.

In logic you can defined where clause logic.

Done.

Page List Property : It is a property mode, which refers to a class and holds multiple Pages of the referenced class.

Obj results are read only page list.

However, In other words page list is an “ordered collection of pages”.

Each page will have an index value like 1,2,3 and so on N….

Countries -> Page List

1.Countries (1) page

a. Country Code = CA
b. Country name = California

2. Countries (2)

a. Country Code = US
b. Country Name = UAS

3.Countries (3)

a. Country Code =UK
b. Country Name = Uking

4.Countries (4)

a. Country Code =IND
b. Country Name=INDIA

Obj-Browse execution :

When an Obj-Browse method is executed, the results on clip board will be in Page List format.

On any table if Obj-Browse is executed it retrieves  the result on to an OOTB page list “pxResults”

Which in turn will be available on another  page, which we have specified in “Obj-Browse Method”.

“pxResults” is an OOTB property which is available in OOTB class “Code-Pega-List” as shown below.

Here PASHON page is holding pxResults page list property , which is of class Code-Pega-List.

Hence PASHON page must be referring tom Code-Pega-List class.

Next, Each page of pxResults i.e, pxResults (1),pxResults (2) and so on…., Are holding StateCode and State Name Properties

Hence pxResults (N) should refer to PASH-Data-States class.

On Browse page, it holds below prop

Originally, the pre-query utilizes class names to represent the tables involved. Following this step, the pre-query is processed by a dedicated component, the “Class and Table Mapping Rule” (Data Base Table Rule). Essentially, this rule acts as a bridge, translating the class names into their corresponding physical table names within the database. Consequently, the post-query emerges, reflecting the actual table names used for data retrieval.

Understanding Dropdown control:

pxDropDown : The following options can be used to populate a Dropdown control

  1. As Defined on Property (Values defined in Local list)
  2. Clipboard page calling Activity or Data Transform.
  3. Report Definitions
  4. Data page.

Working with populating a dropdown dynamically at run time : Populating Dropdown using Clipboard page Activity:

From the above screen.

Clipboard page : This Suggests For successful data retrieval, it’s critical that this page, where results are fetched from the table, exactly matches the page name specified in the ‘FetchStates’ activity using the Obj-Browse method. Before we use the above page; however, it must be defined in pages and classes tab of Section. Moreover, this is the activity which will be browse data from table. Done.

Conclusion

Therefore understanding and effectively using activities and tables in Pega becomes crucial for building robust and efficient applications. Consequently, by following best practices, leveraging advanced features, and optimizing performance, you can create scalable and maintainable solutions that meet complex business requirements. In addition, a solid foundation in activities and tables empowers you to architect workflows that are adaptable and efficient. Furthermore, Pega’s functionalities allow you to automate complex tasks, improving process accuracy and streamlining operations. Hence, effective utilization of activities and tables becomes a cornerstone of building exceptional applications within the Pega platform.

More topics in the technology click here

 

 

Leave a Comment