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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Force Update Property Values to a older point in time and Farewell

CarlesColl
18-Opal

Force Update Property Values to a older point in time and Farewell

Dear community,

 

This maybe my last post and contribution, it’s been 5 years with ThingWorx and IoT a long trip… starting on TW 6.0 up to TW 8.4 (just migrated two weeks ago). I’m moving out of ThingWorx and IoT space by the end of the month, to a totally new career type.

 

I’ve developed my last extension, because of TW 8.4, in order to Update Property Values to older times than current property time. Actually with TW 8.4 (I don’t know at what point between TW 7.3 and 8.4 this behavior changed) if you try to update a property to an older point in time, property write – if it’s logged- will be done on the ValueStream but not on the property itself. With the actual platform – at least Up to 8.5 - there isn’t any way to set a property back in time (current property value).

 

The right path, to resolve this, would be to open a support case and discuss with R&D if this is by design or a bug. I can understand the reasons to write only on the ValueStream for older values, actually I do by myself from the beginning – in order to ingest buffered or historical values – but they must let the developer decide. But I didn’t had time, that’s why I’ve built the extension.

 

The extension and source code it’s on this GitHub repository: https://github.com/carlescm/ThingWorxWorkaroundsExtension self service

 

That’s all folks!

Carles Coll

4 REPLIES 4
PaiChung
22-Sapphire I
(To:CarlesColl)

Thanks Charles, you'll be missed here

Hi Pai,

 

Thanks! but for sure I left it on good hands.

 

Carles.

I come to PTC by 2016 and you're already the expert in IOT field, wish you success in the next career!

@CarlesColl If I understood the use case correctly, it is as mentioned in this article.

 

We had a customer whose historical values would come in batches and previously this used to alter the current value even if the timestamp of the current value is newer than the value coming in the batch. 

 

The behaviour was changed in 8.3.13, 8.4.9, 8.5.5 & 9.0

 

The earlier behaviour was like this

  1. UpdatePropertyValues – Change historic value, fire event and updates current value as well
  2. AddBooleanValueStreamEntry(as an example) – Change historic value, does not fire event and does not update current value

The requirement(for UpdatePropertyValues) was to change historic value, fire event and should not update current value(unless the timestamp is newer than the current one). 

 

Could you please give an example of when the previous behaviour would be useful? I would be happy to convey this to R&D. 

Top Tags