cancel
Showing results for 
Search instead for 
Did you mean: 

Change the type of an context attribute in runtime dynamic

0 Kudos

Hi,

I would like to change the type of a static context attribute in runtime.

I tried to delete the attribute and add a new one with the correct type and the same name than the deleted one but as it is static it wasn't possible to do so.

I could also create the attribute dynamic and then it would be possible to delete it, but isn't there a better solution to change an attribute type?

Kind Regards,

Maximilian

Accepted Solutions (1)

Accepted Solutions (1)

former_member215843
Active Participant
0 Kudos

Hi Maximilian,

You cannot change the type of a statically defined context attribute. You can define the node with all static attributes except the changeable one, and then during runtime you can add it according to the desired type. Such a dynamic attribute may be removed and redefined later. This is not possible with statically defined attributes. Please take into account that removing attributes from the nodeInfo will invalidate all node instances based on this nodeInfo.

Ciao, Regina

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

you could use the infonode where the attribute is stored and do the get_attribute()

later on you change the attribute type_name type_id in the local object, delete and

set the attribute object and it's changed, maybe by changing it there it's allready done

grtz

Koen

0 Kudos

Hi,

but get_attribute doesn't return a reference but a describing attribute_info-structure.

How can changes there effect the actual attribute object?

And as i mentioned deleting the static attribute only results in an exception.

Is it possible to get a reference to the attribute object itself and change its parameters?

Regards,

Maximilian