I have added an attribute called "maintenanceMode" . At the beginning of a workflow launch I look up the value of this (it is a boolean) and if it is set to true the workflow sleeps for 5 minutes then wakes up and checks that value again. If it is set to false then the workflow should execute the remainder of the run. The problem I am having is the workflow only seems to pick up the value of the attribute as it was at runtime. If I switch the value which I am doing manually it doesn't seem to pick up the change. Is there a refresh of some sort I need to force before checking it to clear any cached value?
Paul
To get Paul's attention on this post.
Sehr geehrte Absenderin, sehr geehrter Absender,
ich werde ab 31.05.2013 wieder im Haus sein.
Meine Vertretung Herr Seitz (07141-16 753521 / marc.seitz@ww-informatik.de<mailto:patrick.haefner@ww-informatik.de>) wird Ihre Anfrage bearbeiten.
Bitte beachten Sie, dass eine Nachricht, die als ,privat' oder ,persönlich' gekennzeichnet wurde, nicht gelesen bzw. bearbeitet werden kann.
Mit freundlichen Grüßen
W&W Informatik GmbH
IE Systemtechnik 2 Server
Christian Wehner
Postanschrift: 71630 Ludwigsburg
Büroanschrift: Im Tambour 6, 71638 Ludwigsburg
Büro: K6 0253
Wüstenrot & Württembergische - Der Vorsorge-Spezialist
Telefon: 07141 16-756019
Telefax: 07141 16-856019
E-Mail: mailto:christian.wehner@ww-informatik.de
Internet: http://www.ww-informatik.de
W&W Informatik GmbH
Geschäftsführer: Jens Wieland, Ralph Wildermuth
Aufsichtsratsvorsitzender: Dr. Michael Gutjahr
Sitz: Ludwigsburg, Registergericht: Amtsgericht Stuttgart HRB 204709, USt-IdNr. DE 176036989
P Bitte denken Sie an die Umwelt, bevor Sie diese E-Mail drucken
*******************************************************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht
gestattet.
This email may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this email
in error) please notify the sender immediately and destroy this email.
Any unauthorized copying, disclosure or distribution of the material
in this email is strictly forbidden.
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.
Hey Sirry. I did run into the same thing with the vCD info and I am aware of the updateInternalState methods. Thanks for sharing though! I am hoping there is a similar method for refreshing the orchestrator items as well. There wasn't anything obvious to me. For now I am accomplishing what I need to do by using a text config file on the orchestrator server but I would prefer to use a configuration element.
The configuration element is loaded once when the workflow is started (by design). If you change the config element outside of the workflow and do not restart it you will not get the new value.
To work around this use a nested workflow in your main workflow. This will ensure a new workflow is started and picks up the new values.
Christophe.
To get Paul's attention on this post.
Lemme test and see what happens.
This works. If I made an action that called the workflow in the script would that also get the updated value?