VMware Cloud Community
odesey
Enthusiast
Enthusiast
Jump to solution

Missing Values In Workflow

I copied the "Clone virtual machine, no customization" workflow and created a wrapper for it where I set all the values except the name of the VM that will be created. Next I used the Firefox REST Client plugin to do a POST to the REST endpoint of the workflow and included the value of the machine name like this:

{

  "parameters":

  [

    {

    "value":{"string":{"value": "newVM001"}},

    "type": "string",

    "name": "name"

    }

  ]

}

This all works as expected and a new VM is deployed with the name I specify. Awesome!

Now I take the exact code and drop it into my application, set all the needed values and test my REST call. The workflow is kicked off but it fails with the error:

Unable to create VcVirtualMachineRelocateSpec: TypeError: Cannot read property "parent" from undefined (Dynamic Script Module name : getRelocateSpec#8)

After hunting down the issue for some time I discovered that all of the values I set in my wrapper are reporting as undefined/null. So for example in the getRelocateSpec Action, "pool" and "host" are undefined when I send the request from my application, but they have the values set from the wrapper when I send the request via the FF REST Client.

Is this a bug or am I missing something here?

Just to be safe I tried with JSON and XML, same deal. I can see the new VM name being received by the workflow but all the values set by the wrapper have been wiped out for some reason.

Here is the XML code:

<execution-context xmlns="http://www.vmware.com/vco">

  <parameters>

    <parameter description="A virtual machine" type="string" name="name">

      <string>newVM001</string>

    </parameter>

  </parameters>

</execution-context>

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
odesey
Enthusiast
Enthusiast
Jump to solution

I managed to fix the issue. The account I was using to execute the workflow wasn't properly permissioned. Once I elevated the permissions everything worked as expected.

View solution in original post

0 Kudos
1 Reply
odesey
Enthusiast
Enthusiast
Jump to solution

I managed to fix the issue. The account I was using to execute the workflow wasn't properly permissioned. Once I elevated the permissions everything worked as expected.

0 Kudos