Skip to main content
16-Pearl
December 21, 2018
Question

Persistent infotable

  • December 21, 2018
  • 2 replies
  • 1961 views

I have in a thing an infotable property that is set as persistent.

I get that if I restart the thing (with its service) , all the infotable data is retained correctly

 

but if I restart the platform (Tomcat) not all data is retained, seems there is an old "snapshot" of the infotable

 

NOTE: the datashape of such infotable has an infotable inside .... so one of the Fields of such infotable is another infotable (just an integer array). It is this "embedded" infotable that seems to lose data.

Don't know if this infotable "field"  is different from a basic variable like int number or string....

 

Restarting the thing, or restarting Tomcat shouldn't be the same for this behaviour (data loss) ?

Seems no ... so I can't test easily if infotable data is retained ...

2 replies

5-Regular Member
December 21, 2018

Hello.

 

It may be best to open up a Technical Support case for this issue.

 

 

Thanks,

 

-- Craig A.

5-Regular Member
December 24, 2018

That's actually true, the data in infotable property is not usually safe, especially infotable in an infotable. The value changes inside the infotable property won't trigger the "ValueChange event".

 

The infotable values are kept in memory, the property is only used as temperory data (matrix) holder, if you want to keep the data long enough, they should be stored in Stream or DataTable.  

1-Visitor
December 24, 2018

To update persistent infotable properties you always need to set the whole property:

 

var infotableToModify = me.myInfotableProperty;

infotableToModify."change whatever";

me.myInfotableProperty = infotableToModify;

 

Support
December 31, 2018

Hi @iguerra.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for using our community!

 

Regards.

 

--Sharon