Question

How to sync the offline data to online on a button click in our V722 mobile app?

Hi,

We are using V722 in our application development and we have our own mobile app (native) to handle the customer requests. We have worklist (My Applications) and in that we have all pending/submitted work items. We have a button called "Refresh" and we got a new requirement on this button click. The requirement is like when the end user clicks on the button, we need to sync all the offline data to online for that end user.

I know we have a offline to online sync process in the product itself and is being handled through a Service-REST rule instance: DataSync - Synchronization service (Activity:pzDataSyncRequestParser). This service is being invoked from a OOTB offline script rule:pyWeb-login-mobile-synchronization using JS function:clientStoreConfiguration().

But in my new requirement perspective, how we can leverage this offline to online sync process? Please suggest me a best approach to implement this functionality.

Thanks and Regards,

Ravi Kumar.

***Edited by Moderator Marissa to update platform capability tags****

Correct Answer
November 20, 2019 - 11:24am

Hi Rett,

After adding the function:datasyncStart() call as mentioned in article, I did my initial round of testing for my requirement and is working as expected. But will wait from my team's observation on this fix. Hoping that they will also be fine. For now, closing this Post.

Thanks,

Ravi Kumar.

Comments

Keep up to date on this post and subscribe to comments

November 19, 2019 - 3:04pm

Hi Ravi,

Please check out this article as it may help you directly achieve this requirement.

https://community.pega.com/support/support-articles/sync-status-or-delta-sync-request-icon-does-not-display

Similarly, a call to pega.offline.DataSync.start() should achieve the same.

November 19, 2019 - 5:01pm
Response to Rett_Hean_GCS

Thank you Rett. Let me use that function call from my requirement perspective. Will get back to you.

November 20, 2019 - 11:24am

Hi Rett,

After adding the function:datasyncStart() call as mentioned in article, I did my initial round of testing for my requirement and is working as expected. But will wait from my team's observation on this fix. Hoping that they will also be fine. For now, closing this Post.

Thanks,

Ravi Kumar.