Automatic Client Activities
243
Views
7
Comments
New
Components

Hi All,

I was thinking why can't we have automated client side logics. I have came up across with a barrier where client side logic should run automatically on given schedule or if the data is created or updated in database. We can't always go with the JavaScript to refresh data or call client action every 30 sec or 1 min to check the updated data. 

We have Timer and BPT for server side logic. So I was thinking of having the same for client side logic. It would be great!!

:)

@Xavior yes it will be great it we can do it.

Yes, it will helpful.

Hi,

The idea might be great, but how could this ever be implemented?

Timers and BPT processes are run independently of a user. On the client (browser) they would only run specifically for the user or browser session.

Your OutSystems application only runs on the client, while you have it open in a browser. So no process can run in the background if you don't have the application open in the browser. Contrary, Timers and BPT processes are processes running as services on the application servers of your OutSystems environment and don't require an application open in the browser.

The only capabilities you have in the browser are SetInterval and SetTimeout JavaScript functions, but they will only run in the context of an OutSystems application opened in the browser.

So, maybe you can explain who you think your idea could be implemented?

Regards,

Daniel

Hello @Daniël Kuhlmann ,

I am not saying that we can implement exactly as BPT. But we can send the response to the browser if the database is updated and yes if the application is running. It would be more helpful in mobile devices as many applications can run in background.

Hi Xavior,

Well first of all OutSystems mobile applications don't have built in features to run in the background, although there are Forge components that allow you to keep the app active in the background.

So if I understand you would for example if, there is a manual activity, that a notification is opened on the mobile that when pressed the activity shows the correct screen in the app?

This can already be done using deeplinks and notification systems available in the Forge.

Regards,

Daniel

@Daniël Kuhlmann 

As I stated earlier, there won't be any human activities involved. Consider a XMPP protocol where the client opens the socket with the XMPP server and keeps it open as long as the client is logged in.

My idea is to build similar kind of component, which enables the real-time exchange of structured data between two or more network entities.

ok thanks for the added detail