VMware Cloud Community
WinStime
Enthusiast
Enthusiast

How to decode Array of composite type ?

Hello,

I used a foreach workflow to execute some tasks. I need to get the output.

When i designed the WF, vRO create automatically the output of an Array of composite type which contain the 4 output of my WF

2.png

1.png

I tryed to read data in these composite type, but i am unable to retrieve the content.

Does anyone has an exemple on how to get data ?

I need to read the outputPS which is an PowershellRemotePSObject.

Thanks for you help

Tags (1)
0 Kudos
2 Replies
stevedrummond
Hot Shot
Hot Shot

A composite type is effectively just a POJO with the keys being the "property names" of your composite type.

So you should just be able to reference myobject.outputPS.

e.g.,

System.debug(System.getObjectClassName(myObject.outputPS)); // PowerSHell:PowerShellRemovePSObject

0 Kudos
iiliev
VMware Employee
VMware Employee

Check the following thread for some hints / sample code showing how to deal with result of type PowerShellRemotePSObject:

https://communities.vmware.com/thread/621246

0 Kudos