Mashup Builder > Mashups > Updating Properties Automatically in a Mashup
Updating Properties Automatically in a Mashup
You can configure a mashup to use websockets and to receive property updates automatically using the GetProperties service. In the Data Properties panel, when the Automatically update values when able check box is selected and the mashup is viewed, the mashup run time creates a websocket connection with the ThingWorx Platform and subscribes to the properties that are bound to widgets. When a property changes, the mashup receives the new value and processes it as though the service had been invoked.
In order to create this websocket connection, ThingWorx generates a temporary application key (named TwxRuntimeKey_<Username>_appkey (in previous releases, it was named TwxRuntimeKey_Username) to bind with. The bind is needed in order to subscribe to the properties; otherwise, the event data cannot be sent back to the browser. The temporary application key expires after 15 seconds and is deleted after 30 seconds.
* 
While this temporary key is deleted after 30 seconds, if the ThingWorx Platform is shut down before 30 seconds elapses, this expired key may remain on the server. The next time that user views a websocket-enabled mashup, the old application key will get deleted and a new one will be generated.
* 
If an Auto Refresh widget is bound to GetProperties and the browser supports websockets, the Auto Refresh widget will not call GetProperties, but will still call any other services it is associated with. For more information on the Auto Refresh widget, see Auto Refresh Widget.
Was this helpful?