Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 170134

Re: Running workflow not getting updated configuration element attribute value

$
0
0

I am not affiliated with VMWare(I'm just a partner on the same boat so I'm not sure how definitive my answer will be but I will try my best to help!), but hopefully this helps:

 

I came across a similar issue when I was trying to change some attributes for a VM under vCD (I have a solution for non-VCD after). Once I changed them, I needed to access the new values in the same workflow. However, I was still stuck with the old values. I found out that these values are indeed cached from the point you first assign them into a variable. There are indeed calls up update the internal state.

 

To update a vApp, you can use the following:

System.getModule("com.vmware.library.vCloud.operation").updateInternalStateVApp(targetEntityArg) ;

 

To update a vm (and man it starts getting tricky here because it works sometimes, and other times you need to call another update function), do the following:

System.getModule("com.vmware.library.vCloud.operation").updateInternalStateVM(targetEntityArg) ;

 

I learned this from an example posted in their vcd notifications package...

 

 

If you are looking to do it under vSphere, not vCD, you will have to call the get-VM or get-view [obj] command again for it to regrab the data.

 

 

Note that doing so in both VCD and VSphere do seem to take a consdierable amount of load...

 

Hope this helps.


Viewing all articles
Browse latest Browse all 170134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>