The below is the outline of the contents that we are going to discuss

  1. What is a savable datapage
  2. Use Cases
  3. Types
    1. List
    2. Page
  4. Configuring savable datapage

What is savable datapage

You can define a data page to save data to a system of record by using save plans. By using save plans, you can save the updated information after without an activity.

I would prefer to go through this , which will give you the basic fundamentals about the datapages if you are a newbie (don’t worry all of us were newbies once :P)

Usecases

Usecase 1 :

Assume a car rental application, where end users have options to book a car for rental reservation. As part of this the user need to be shown the available slots for a car to book. And when user selects a particular slot, we need to make that particular slot status to unavailable, so that all other users will not be selecting the same slot.

Without Savable Datapage

To show the details related to available slots, we will be using a datapage, later when user selects any slot we use an activity to update the details.

With Savable Datapage

To show the details related to available slots, we will be using a datapage, and also we use the same datapage to save the updated contents by configuring data save options.

Usecase 2 :

Assume you are getting customer details like Account Number, Address, Phone Number etc., from an external database. User have the ability to change the address/phone. Once the user updates any of his details, we need to update the external database.

Without Savable datapage

We use a datapage to store the customer details to avoid multiple calls for the same data if needed multiple times. And whenever the details are changed we use an activity to send the updated data back.

With Savable Datapage

We use a datapage to store the customer details to avoid multiple calls for the same data if needed multiple times. And whenever the details are changed, we use the same datapage to send the updated data back.

In both the scenario’s we use activities, but in the second scenario (with savable datapage), we define the activity that is used to update along with the connector that is used to read the data in the same datapage. Therefore having everything in one place.

Types

We can save datapages of both the List (more than a single record) and Page (single record). The only difference will be the options that are available to save them will differ. And one can find these options under the section Data save options

  1. List
    1. Activity
    2. Robotic Automation
    3. Robotic Desktop Automation
  2. Page
    1. Database save
    2. Activity
    3. Robotic Automation
    4. Robotic Desktop Automation

Configuring Savable Datapage

Before configuring savable datapage, following things needs to be considered.

  1. Structure of the datapage i.e., List/Page as the options for saving will differ.
  2. Type of database save i.e., Activity/DataTransform/Robotic Automation/Robotic Desktop Automation
  3. When to save i.e, when should be the data as part of the datapage should be committed. For example, as part of flow processing or assignment processing etc., Pega gives capability to save datapage contents as part of the below options
    1. Flow
    2. Flow Action
    3. Activity

We will discuss in detail about each one by showing the sample configuration.

Usecase 1 : User has ability to update his address/phone number by accessing a local action. When the user chooses the local action, the screen will be present with current values in the database. Once the user updates any values and submits the form the same will be updated in the database. Through the entire process we will use the same datapage to present and update the contents. And I will be explaining to achieve the same outcome in all the three ways (Flow, Flow Action, Activity) mentioned above.

Datapage Configuration

The datapage shown below will be used to retrieve the address details and when the user updates any values, the same will be updated in database.

As we are dealing with only one row at a time the structure is configured as a page. And the type of data save option I selected as Database save.

Note: Database save option will be shown only when the Edit mode is Savable.

Triggering data save options

We can trigger datapages for saving the data in the following three ways as mentioned earlier.

  • Flow – Using Save Datapage utility

  • Flow Action – Using post-processing options

  • Activity – Using Save-Datapage method

We will be implementing the usecase by taking the first option as the approach.

Data save option – Flow

  1. Update Address – Case wide optional process

Running a case to update the address by launching Optional Process – Update Address

Current address in the database

Updating the address fields to different values and submitting the Assignment.

Updated address in database

The same can be achieved by using the other options i.e, Post-Processing of a Flow Action or Activity.

That’s it. Yeah, we reached the end. Hope you learned something new in this post.

We are open to an attack of queries/improvements if you have any. We always learn better in what we do.

Please feel free to comment or share this with your friends. Sharing helps in spreading knowledge

Happy Learning !!!

About author

I am Satish Segu, author and owner of CodeStay articles. Working as PEGA developer and have knowledge on different areas starting from data transforms to chat bot configuration.

Feel free to roam around the site and let me know for any doubts/suggestions for upcoming posts in the comments. 

Follow me over social networks using the below links.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *