Is it possible to detect the data saved in external database ?

Hi Everyone,

I am trying to detect if data is saved in external DB. For that, I have created an external DB connection which is connected successfully. Extension is created and added it in my application. Now my challenge is if my tale data is getting added externally I am not able to detect the change i.e data is not getting refreshed automatically. Post publish it is getting refresh and I am able to see the data.

Can anyone suggest me how I can achieve this?


Hi Anu,


What are you trying to achieve? Do you want to trigger some action when data in your external database is changing? 

Please check if this helps you - trigger a process when a new record is inserted in your external entity:


I could not understand what do you mean by you see the updated data after publish, could you please explain?

Akshay Puri wrote:

Hi Anu,


What are you trying to achieve? Do you want to trigger some action when data in your external database is changing? 

Please check if this helps you - trigger a process when a new record is inserted in your external entity:


I could not understand what do you mean by you see the updated data after publish, could you please explain?


this is what I want to achieve now if I have added record in my external DB , but not from outsystem application some other application, I am not able to detect that change into my process

Hi Anu,

Are you saying your process is not getting triggered after the record is inserted? 

Akshay Puri wrote:

Hi Anu,

Are you saying your process is not getting triggered after the record is inserted? 


Yes . Is there any settings I need to do?

Hi Anu,

Looks like it is not possible to do this through the external entities but through real OutSystems entities only. As an alternative you might want to create a timer to keep polling the external database about any change being made. Refer this thread: https://www.outsystems.com/forums/discussion/34688/db-external-enable-process-event/


You can also write a listener plugin like https://stackoverflow.com/questions/5288434/how-to-monitor-sql-server-table-changes-by-using-c to do this which will wake up your timer on record change in external database.

Just to confirm, go to the more options of the intended entity and check below setting. If you find it disabled, then you will have to look for alternatives.

Akshay Puri wrote:

Just to confirm, go to the more options of the intended entity and check below setting. If you find it disabled, then you will have to look for alternatives.

This option is disabled in my case. Then I guess I will have only one alternative to create timer is it correct?


Solution

Yes Anu. Also as I said, you can also create a listener plugin to achieve this.

Solution

Akshay Puri wrote:

Yes Anu. Also as I said, you can also create a listener plugin to achieve this.


Thanks Ashish, for your quick response it saved my time :) Cheers