8.3.1 System.tag.getConfiguration() not behaving the same as 8.1

Previously in 8.1 the system.tag.getConfiguration() would return a config object that could then be used to make edits to a tag and then reconfigure it using system.tag.configure() with that config object.

tp = "[default]Test/New Tag"
config = system.tag.getConfiguration(tp, True)

system.tag.configure("[default]Test", config, 'o')

In 8.1 this gives a [Good] result.

However in 8.3.1 this gives the following error.

[Error_Configuration("java.lang.ClassCastException: class com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty cannot be cast to class java.lang.String (com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty is in unnamed module of loader java.net.URLClassLoader @5528b3ac; java.lang.String is in module java.base of loader 'bootstrap')")]

Looked into this a bit more and it seems that previously in 8.1 a tag object returned like below.

dataType(<type 'unicode'>) : String
path(<type 'unicode'>) : [default]Test/New Tag
tagType(<type 'unicode'>) : AtomicTag
name(<type 'unicode'>) : New Tag
valueSource(<type 'unicode'>) : memory
value(<type 'unicode'>) : Test Value

While 8.3.1 returns that object as below where the defaultValue and value key are no longer a unicode type as before and is what seems to cause the java.lang.ClassCastException seen when trying to use that config object in the system.tag.configure() function.

dataType(<type 'unicode'>) : String
defaultValue(<type 'com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty'>) : 
path(<type 'unicode'>) : [default]Test/New Tag
tagType(<type 'unicode'>) : AtomicTag
name(<type 'unicode'>) : New Tag
valueSource(<type 'unicode'>) : memory
value(<type 'com.inductiveautomation.ignition.common.config.BasicDescriptiveProperty'>) : Test Value

Does anybody know if this is intended behavior of how this will work going forward? I assume I will need recreate these objects with string type keys for the system.tag.configure() to accept it properly.

This is a bug that's fixed in 8.3.2, which should be released within a couple of weeks.

Thanks for the quick feedback on this!

1 Like