Syncronize Local Store in my Web App with DB

Hi,

I´m finishing master´s project in outsystem but I have a problem:

I don´t know syncronize data of web app to data base.

I create this server actions on web app

and I need send to the data base in core

Is there anyone who can help preferably with an example.

Regards

JReigado

Hi José


What do you mean by synchronize? You can use the Create, Update or Delete actions to insert or modify data on the entities.


Regards,

   CLSJ

Hi Jose,

You want to create sync process to insert data in the database. I have few question -

# What is the purpose in the web app?

# Did you want to sync data from OS database to some external DB?

# In web, you can directly use Create/Update/Delete operations from inbuilt function of each entity.


Can you describe briefly about your requirements.

Thanks,

Rajat Agrawal

Hello Jose,

You have this video (and the next one in the list): https://www.outsystems.com/learn/lesson/1802/data-synchronization-overview/?LearningPathId=0

And this one: https://www.outsystems.com/learn/lesson/1802/data-synchronization-overview/?LearningPathId=0 (this one is for OutSystems 10 but works the same way for OutSysttems 11).

You can also have this exercise in the Mobile Path in the Learn centre (that would require you to do the whole training online): https://www.outsystems.com/learn/lesson/786/data-synchronization-exercise/

You have also this "checklist" that is useful: https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Offline/Offline_Sync_Checklist

Hope this helps.
Cheers.


Hi Rajat

The web app need to work offline when the user don´t have network. 

The user with this app take a foto and writes a description (offline).  When he has net the data is send to the website (through the database) and the operator receive the data treats and responds.

I have some difficulties with platform outsystem can show me an example please.

Need more informations about my project?

Thanks

J Reigado

Thanks Eduardo,

I wiil see the documentation and I hope to solve the problem.

Best Regards

J Reigado

Jose Reigado wrote:

Hi Rajat

The web app need to work offline when the user don´t have network. 

The user with this app take a foto and writes a description (offline).  When he has net the data is send to the website (through the database) and the operator receive the data treats and responds.

I have some difficulties with platform outsystem can show me an example please.

Need more informations about my project?

Thanks

J Reigado

Same thing I am wondering yesterday, you are working on mobile app not web app. We have local storage and sync process we have in mobile app.

Just follow Eduardo solutions and your problem will resolve.


Thanks,

Rajat Agrawal


Hi Eduardo

I recived the data of my database in my mobilie app but I dont understand how can I send (post) data to my database allocated in my web app.

Please give me an example to send information mobille to database in web.

Thanks

JReigado


Hello Jose,

In the documents I passed the links explains how to do it. If the problem is that you are trying to sync with a different application web, just make the entities public and not read only (ideal would be to have wrappers) , and now you can reference them in the mobile module and use in the server side of the sync pattern of your choice.

Cheers

PS. Sorry, don't have an example to send.

Thanks for your response Eduardo,

My Local Entities weren´t public. I change the local Entitie to public as follow:


My next question is: What should I do to send the local entities data (in mobile app) to the data base (core in web app). 

I hope you still have time to help me but in any case I want to thank you for the guidence you gave me. This is a university project that has to be delivered at the end of this month; I've been working on this for the past one and a half years.

Cheers
J Reigado

 


 


Hi José,

The short answer is: In the client action in logic tab hou add the aggregates to fetch data you want to send to server, and call the Server action passing those lists. 

You will need to add input parameters to it to receive those lists, and server side now you can process this info and sync to the server entities.

But there are many different patterns of sync and I really advise you to take a look in the videos I sent the link previously, as they were made exactly to teach you how to sync.

Good look with the project!