cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

ServiceInvoke Completed

VC_10938534
8-Gravel

ServiceInvoke Completed

Can I service invoke complete to refresh to a line chart?

Using ThingWorx 9.3.5

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @VC_10938534 

 

Auto refresh will be a good option to fetch data from tables / external DB.

 

ServiceInvokeCompleted will overload the server and affect app performance. You can place a refresh button in Mashup with the last refreshed time so user can refresh data manually which will decrease the load on server / external DB.

 

Something like this :

Velkumar_0-1710218346229.png

 

/VR

 

View solution in original post

6 REPLIES 6

Hi @VC_10938534 

 

Yes you can refresh the line chart data to load fresh data

 

/VR

Could you please further elaborate on how we would bind this, and if possible with an detailed explanation of how it works? This is the current error I am receiving when i do a refresh to the line chart data to load fresh data.

VC_10938534_0-1709760866447.png

 

Hi @VC_10938534 

 

Could you please tell me when you want to refresh the Line Chart data ?

 

Based on your binding, the AutoRefresh function will fetch data automatically based on the Interval. You don't need ServiceInvokeCompleted event to fetch data again which is going to overload the server. 

 

/VR

I was trying to see if i could use a ServiceInvokedCompleted Event instead of a the AutoRefresh function. I would say i would want to refresh the Line Chart Data whenever it updates since it could vary in time

.

Hi @VC_10938534 

 

Auto refresh will be a good option to fetch data from tables / external DB.

 

ServiceInvokeCompleted will overload the server and affect app performance. You can place a refresh button in Mashup with the last refreshed time so user can refresh data manually which will decrease the load on server / external DB.

 

Something like this :

Velkumar_0-1710218346229.png

 

/VR

 

We need to be cautious with statements like "ServiceInvokeCompleted will overload the server and affect app performance".

ServiceInvokeCompleted will trigger each time a service invocation happened. It is not the event that creates overload, but the frequency of that event happening. In the binding shared above the real issue is that the user is trying to do a circular dependency, which means "call service X as soon as service X finished executing".  The Mashup Builder detects and forbids this situation, otherwise this would result in a very high frequency of execution for Service X.

Generally I also generally advise against "AutoRefresh", unless the use-case really calls for it (eg: my dashboard needs to display read-only data for the operator, and they don't have a way to interact with it). Consider this situation: if a mashup will be used by 100 operators and we have an AutoRefresh in it set at 10 seconds, but the operators don't really the data to be refreshed automatically, and if the service is disk-intensive, this will trigger an overload.

(And in cases when this happens, I would investigate whether I can use the "Update Properties Automatically when able" to have the server push data to browser).

Generally, as it was stated at the end, a manual refresh button is the best option in terms of server usage (again, if possible in that use-case).

Top Tags