VMware {code} Community
abergman89
Contributor
Contributor

Only return one parameter from SOAP operation

i've created a workflow from a WSDL file, and it works without issues. But the output is type: property and i only want to return a string containing one parameter from the response.

I've tried using the getOutParameter() function, and it seems to work inside the workflow, i can pass the string to a logaction in the workflow and it gets logged, but when i use it in an existing workflow the variable isn't passed on to next action/workflow.

I have mapped the output from the script to an output parameter in the workflow, and then mapped the workflow output to an out- attribute in the hosting workflow.

I would want to build a string from the SOAP parameter and other input parameters in the workflow,and then use those values later in the workflow, how would such a script look?

Anyone got any ideas?

br

Andreas

Reply
0 Kudos
4 Replies
sanchezs
VMware Employee
VMware Employee

Hi Andreas,

> I would want to build a string from the SOAP parameter and other input  parameters in the workflow,and then use those values later in the  workflow, how would such a script look?

I didn't quite get the idea. Could you add a screenshot of the higher level workflow that you are building? To see what scripting elements you have and where you invoke the SOAP plug-in workflow. Because you are not invoking the workflow directly from the scripting element (i.e. using Javascript) but you're using a workflow invocation element inside your workflow, aren't you?

If the return type of a workflow is of type Property you shouldn't have problem to pass it to other workflows and to get the strings inside it.

Sergio

abergman89
Contributor
Contributor

I'll get a screenshot on the workflow later today.

Do you know I i fetch a string from a property? Do I have to use javascript or is there an action I can use to use the string as a attribute?

Thx!

Andreas

Reply
0 Kudos
abergman89
Contributor
Contributor

Didn't manage to retrieve the string or pass it on and reuse it later in the workflow, so I built a workaround in ou provisioning script.

Reply
0 Kudos
sanchezs
VMware Employee
VMware Employee

Hi Andreas,

Did you check the vCO documentation inside the Basic Scripting Examples section? There's a subsection "Setting and Obtaining Properties from a Hashtable" that maybe it's what you are looking for...


http://pubs.vmware.com/vsphere-51/topic/com.vmware.vsphere.vco_dev.doc/GUID4660AD05-E4C1-44A9-9005-0...

And from the vCO Client you can always access to the Orchestrator API Explorer and check the different methods and attributes for all the scripting objects.

http://pubs.vmware.com/vsphere-51/topic/com.vmware.vsphere.vco_dev.doc/GUIDEE187E8D-33C7-43B2-8E88-D...

I hope it helps.

Sergio