VMware Cloud Community
millesonz
Enthusiast
Enthusiast

Incorrect Type when adding Attribute to Configuration Element

I am attempting to add new attributes to a configuration element using the "ConfigurationElement.setAttributeWithKey" method.

The value type I have populated is an Array of Strings. I confirmed within the workflow, the data is represented correctly in an Array of Strings. However, when using the method to add the new attribute of array of strings as a value, the resulting type that was added into the configElement is just an "array" type. Not an Array of Strings. Because of this, no data was added to the value of the attribute because of the mismatch of types.

Does the API method only accept a single object type, not an array of objects?

Thanks,

-Zach

-Zach
Tags (1)
Reply
0 Kudos
3 Replies
iiliev
VMware Employee
VMware Employee

Which vRO version do you use? Could you provide a sample workflow demonstrating the problem?

AFAIK, there is no limitation for this method to accept only a single object. I tried to add and retrieve array object as an attribute to config element and didn't get any failures in my environment.

Reply
0 Kudos
millesonz
Enthusiast
Enthusiast

I'm on version 5.5.2. Pushing a new attribute and values, all that is created is an "Array" type with no values. If I pre-create the attribute with the type as "Array/string" then the array of strings I am pushing to it from the workflow do show up properly as values to that pre-created attribute. Either way, there is no "failure". But without pre-creating the attribute, the type is set incorrectly and no values reside in that attribute.

I have attached the workflow for reference.

-Zach

-Zach
Reply
0 Kudos
millesonz
Enthusiast
Enthusiast

Any news regarding this issue iiliev‌?

-Zach
Reply
0 Kudos