Question

How to send message to UI from db trigger ?

Hello Community,

 

I have a calculation logic implemented directly on db level. It's working fine but disadvantage of this solution is that i can't refresh page after db trigger will finish.

 

Do You have any idea how to send message (or invoke something similar) from db to refresh page ?

 

Best regards,

Marcin

 

Like 0

Like

2 comments

I think you can create a business process to check the data table every x min and then send the msg to the UI. You need to have some time stamp to check changes or flag.

Hi,

 

Option 1, but it's difficult and won't work in the cloud-based app (since this option will not be turned on): once the stored procedure is completed, call the specific URL to start the process:

 

http://sitename/0/ServiceModel/ProcessEngineService.svc/RunProcess

 

and pass parameters to the request (see which request is sent in the network tab of the browser when you start a process). The URL can be called in TSQL as described here, but the issue is that calling /0/ServiceModel/ProcessEngineService.svc/RunProcess requires authentication that is not possible in TSQL.

 

Option 2: you need to call this logic as a procedure from the script task in the business process and the final element of this process will be either sending a message to the client side to refresh the page or use this marketplace app to refresh the page at the end of the process execution.

Show all comments