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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Thing properties not stored (values are reset when thing is saved)

rvaaraniemi
1-Visitor

Thing properties not stored (values are reset when thing is saved)

Hi,

I just noticed that the latest property values of my things are not saved anymore. If I e.g. change them using the thing UI in the editor I can change the values and I can see that they are changed but when I press Save the values are reset back to 0 or to an empty string. The same happens if the property are inherited from a shape or created for that thing. Also saving the values using a service has the same result.

The values seem to be stored in the associated value stream, though. Just the current / latest values seem to disappear.

Any pointers? Should the server (Tomcat) be rebooted?

TW version: 7.2.5-b56

-Risto

ACCEPTED SOLUTION

Accepted Solutions

Hello Risto Vaaraniemi​,

If you leave aspect Persistent to false, the value is cached in the memory, so every time the memory is cleared, value gets back to the default one. To persist the current value across, you need to set aspect Persistent to true in the property edition panel, e.g.:

Hope it helps.

Regards,

J.

View solution in original post

11 REPLIES 11
supandey
19-Tanzanite
(To:rvaaraniemi)

Hi Risto, how is the Aspect for the property setup? Is it persistent?

Hello Risto Vaaraniemi​,

If you leave aspect Persistent to false, the value is cached in the memory, so every time the memory is cleared, value gets back to the default one. To persist the current value across, you need to set aspect Persistent to true in the property edition panel, e.g.:

Hope it helps.

Regards,

J.

Thanks for the answer. I'll try that.

What is the situation when the property should not be persistent? I'd assume that in normal cases people might want to retain the latest value of the thing properties, so the persistence probably should be on by default.

-Risto

Hi Risto Vaaraniemi​,

I agree, that it could be a default set to true option. But there are also different situations, when you do not want to have this value stored, e.g. if you want to have only the most current values that comes from device. If device sends nothing, it should not be set.

From the Help Center:

Typically, it is best practice not to persist sub-second data changes (such as time series data stored in a ThingWorx data stream since streams are stored in a different area), but data that is required to be maintained over a system maintenance period should be persisted.

Please refer to: PTC.

I my previous answer was correct, please consider to mark it as a Correct Answer for the reference of other users.

Regards,

J.

About this comment on the Help Center, I totally disagree with it, on our platform it's super important that any Time Series (ValueStream) data should be marked as persistent also, otherwise you enter in a lot of inconsistencies when querying last value for a property...

Adam / Anjan what you think of this comment on the Help Center?

Adam ResslerAanjan Ravi

Hi Carles Coll​,

Yep, you're right. That's why I said, that "persistent" could be by default set to true in Thingworx. Usually it's important to have that current value.

Just showing an official point of view from PTC's materials to make my answer more informational.

Regards,

J.

I have noticed the same bug.

On TW 7.1 when you set a property of a Thing A and then click save, property stays the same.

On TW 7.3 when I do the same property resets to default value chosen in its template. Worst thing is that when you save its template, the properties resets as well. Not cool. You dont want to add a property to a template and have all your properties in derived Things reset.

Hi Jaroslav,

This is true even on latest 7.3.6 ( Released Today ) ?

It seems a major bug...

Carles.

My version is 7.3.1.

And I am not sure if this bug was present from the start or if it occured after some time of using. I havent used it for some time. And there was a java update few days back.

And Java version it's the recommended by TW?

Right now there is jre1.8.0_141 on the server, so I think its ok. Since its only minor updgrade from recommended 1.8.0_92.

Announcements


Top Tags