Posted: 12 Dec 2019 12:49 EST Last activity: 20 Dec 2019 0:07 EST
Activity and Local save in Data save options of Savable Data Page
1. If i select Activity as the save type for a D page's Data save options, what should i do in that activity, what kind of steps do i need to add in it ?
2. what is the use of Local save, on hover it says "Save doesn't modify external system", lets say i have this option checked and the data is in external system, if i try to update the data, will it fail ?
I think the activity that we map in the data save options is for manipulating the data before it gets saved to the source, we cannot use Save-DataPage Method here (i used it, no update or save happened since the acitivity is not invoked anywhere).
This is what i tried
Data Page type(Page/List): Page
Data save option(save type): Database save
Started a simple flow with an assignment, updated the D Page data(using an activity in the background) and finished the assignment. In the Assignment's post processing i added an activity which calls step Save-DataPage on the said D Page
End Result: Data got updated in the Data source
Data Page type(Page/List): Page
Data save option(save type): Activity(has a property-set step to update D page data)
Started a simple flow with an assignment, updated the D Page data(using an activity in the background) and finished the assignment. In the Assignment's post processing I added an activity which calls step Save-DataPage on the said D Page.
End Result: Data remains the same in the data source, no update happened.
So still not sure what should I do in the activity which I mapped to the Data save option in D page.
Data base save options are provided to save the data page in the current transaction (i.e., as part of Pega's own commit) or independent transaction (where you need to save the data page immediately in database)
1.You should use 'activity' to only save the 'data page' details to DB.Here only your data page will be saved in DB, whereas if you use 'database save' option then data page will be saved as part of your current transaction.
2. If you need to save the data in other System using REST/SOAP, then u can go with 'Activity' option.
This is my understanding, please correct me if i am wrong
There are three ways to initiate save action on a savable D page
1. Flow Action - Action tab - Postprocessing section, there is a option to add savable data pages
2. Save Datapage smart shape
3. Save-Datapage method in activity
these three options only initate the save action, how and where they are getting saved it what we configure in the Data save options of D page, If it is DB side we will go with Database save option, if it is external system we will go with activity.
Also Database save option is not availble for List type D pages.
Lets try this scenario: D Page(savable) of list type with Data sourced from local Pega DB is referred in a flow action's section (repeating grid), In the Flow action's Action tab i have added the D page to the savable Data pages list.
User will update/add/delete rows in the repearting grid(sourced from D page) and on completing the flow action(click of submit button) instances in the D page should be saved. now for initiating the save i have added the D page to the Flow action's savable D pages list, but in the Data save options of the D page i have selected activity since Database save option is not available for list type. what steps should i have to add in that activity ?