Contributor
Contributor

READ THE vRO output

Hi All,

I have writen a workflow where I am invoking the powershell script and I am getting the output of my poweshell script in vRO sucessfully. Now I want to use the VRO output to my next workflow. Could anybody help to that how to grep vRO output and use in next workflow?

0 Kudos
4 Replies
VMware Employee
VMware Employee

Hi,

The usual way is to store the outputs from the first workflow to attributes, and then either bind these attributes to the inputs of the second workflow (if they are compatible and you want to use the output value directly as input to the next element), or add a scriptable task element to post-process the output values and compute the values of another attributes to be bound as inputs of the second workflow.

0 Kudos
Enthusiast
Enthusiast

what is there in Powershell Output .. String, integer, object, Vector

0 Kudos
Contributor
Contributor

Output is string and integer both.

0 Kudos
VMware Employee
VMware Employee

For simple type you can extract them from the output and provide them as input on following actions.

Attaching sample workflow demonstrating how to extract output of type :

  • string
  • array of numbers
  • array of complex objects

Take a look also at sample workflow distributed with the plugin "Library/PowerShell/Samples/List directory content"

Also there is chapter in official  doc with some example here vSphere 5.5 Documentation Center  and here Examples of Scripts for Common PowerShell Tasks

For providing complex type object between vRO actions all scrpts must be executed in in same PowerShell  session and  PowerShellRemotePSObject" must be used as input type in receiving action.

There is more complex example for providing result  from one ps script to following using PowerShellRemotePSObject  distributed with the plugin (see "Library/Powershell/Samples/Pipeline execution example")

Let me know if you need further details/examples

0 Kudos