Tuesday, 28 August 2018

How to create Local Data Table or Local Database in pega

How to create Local Data Table or Local Database in pega


Hi Friends, Today We will see how to create Local Data base or Local Data table in pega. 


Normally all the case information will store in PegaData database., For example, We are running a flow. We are giving some information in the section. Then where all the information will store??

We are not created database , tables, then where it will store? these details will store in PegaData database. the default database provide by pega. We can store up to 1000 records in PegaData  for each Class == Data Table .In pega we are creating the class then automatically table will be assigned for that class. These We will try now.


Now I am going to create one data class.


First click the app explorer,


Generally it shows Work Class structure,  Normally we will create Local Data base in Data Class only so switch to Data Class Structure by replace Work With Data and then enter.. We can create Data Table by using Data Type option also ..I will say later.

Now we can create our Data class by clicking sysadmin->Create -> Class

After clicking the class, this New Rule Window will open here we have to give the class name in the Lable Field and give the same in the Class Name field after "TGB-HRApps-Data-"  


Then click Create and Open.

Select Class type as Abstract, Choose the version, and choose the class hierarchy. Then click Save.


After I clicked one error message in class creation came, 

In history tab, we must provide the Description and usage or else this error will come. then try to save.

Yeah it saved!!


Then refresh the app explorer and see whether our class is added or not.

After creation of class, we can create properties in our class. since class is act as table in pega, properites are act as column in table. so lets start create properties in our class by righ click on our class and Select Create Properties option.
Now data type rule will open, here we can add our properies by clicking add field
After Create properties click add to data explorer, then open Source tab
Here click the Create local Source button, then one pop up box will open there we have to choose one column as key and we can give value alos if we want for 1st record.
On clicking the next button, a review screen will open click close.

Now open the Record tab there we can see our table structure.
We can add records here.

Thats all, we created local data table. If u have any doubt ask in comment 😊

7 comments:

  1. Hi Mate, Good Post.
    Can you please explain the clear cut difference between abstract and concerete class using pega

    ReplyDelete
    Replies
    1. Abstract class doesn't get saved in Database instance where concrete gets saved in Database instance. In the above example, as we have locally sourcing the data it doesn't require to use Concrete class.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Really nice blog. thanks for sharing such a useful information.
    Kotlin Online Course

    ReplyDelete
  4. This post is so interactive and informative.keep update more information...
    Python Training in Tambaram
    Python course in Tambaram


    ReplyDelete