Hi llian/All,
could you suggest why i am getting validation error while saving the following workflow.this is to create snapshot of multiple vms which are stored in variable"vms".
though this worked fine but i got validation error which indicates there is something not right.
These are the inputs from the snapshot creation workflow you choose when dropped Foreach element. You need to expose them either as inputs to the wrapping workflow, or you can bind them to attributes. To expose them as inputs or skip them for now and later bound them to attributes, click the Setup button (shown in the upper right on the second screenshot) and process them in the dialog.
When you expose them as inputs, they will be exposed as arrays and when running the workflow you'll have to provide the same number of items in the array as the arrays of VM being iterated. During the iteration, the snapshot creation workflow will be called with the values at the corresponding position in the arrays; ie. the first iteration will get the VM at index 0 and the other parameters from their respective arrays also at index 0, the second iteration will use elements at index 1, etc.
BTW, which snapshot creation workflow do you use? The workflow Create a snapshot I pointed to in a previous post has completely different parameters. Is this some custom workflow?
Hi,
Could you post the scripting code as text and not as an image?
From what is seen on the image, the problem is with missing/unbalanced brackets.
iam going to send you the code as text in short time .however it is not missing bracket i have already checked that.
this workflow runs fine and gave deseired output but while saving it gave error .
all i did is to create input parameters which are shown in pink as they are properly bound .howeve iam using "vm " (shown in black)as iterator not as predefined input parameter
.
can this cause problem
do yu have anyother way of doing it using the native capabilities of vRO without writing code (only drag and dropout of box different schema elements and binding parameters )
Yes, there is a way to create snapshots of multiple virual machnes without writing code. You need to use Foreach element to iterate over the array containing virtual machines and for each element of the array to call the workflow Create a snapshot (available under Library > vCenter > Virtual Machine management > Snapshot).
Thanks llian,
iam checking the another way also however my previous query has been resolved as now iam not getting errors .
i will let you know shortly about another method .
this is what i have been trying to do for last two days but unsuccessful.
could you please help me on this .
iam doing following .
1:creating input parameter "vms" to hold list of virtual machines whose snapshot to be taken .in my example three vms and iam inputing them in "vms" .
2:then i draged foreachelement and search for snapshot creation workflow .it looked like below.
3:
i set "vms" as array to be traversed .
4:however iam not able to understand following can yu please guide me from step 3 onwards.
These are the inputs from the snapshot creation workflow you choose when dropped Foreach element. You need to expose them either as inputs to the wrapping workflow, or you can bind them to attributes. To expose them as inputs or skip them for now and later bound them to attributes, click the Setup button (shown in the upper right on the second screenshot) and process them in the dialog.
When you expose them as inputs, they will be exposed as arrays and when running the workflow you'll have to provide the same number of items in the array as the arrays of VM being iterated. During the iteration, the snapshot creation workflow will be called with the values at the corresponding position in the arrays; ie. the first iteration will get the VM at index 0 and the other parameters from their respective arrays also at index 0, the second iteration will use elements at index 1, etc.
BTW, which snapshot creation workflow do you use? The workflow Create a snapshot I pointed to in a previous post has completely different parameters. Is this some custom workflow?
I am trying this again as per yur suggestion and will let yu know .
however i am doing this on hand son lab 1825-01 and using the outof box workflow .it should not be custom one.
i checked again it should be the "create a snapshot for VC plugin ".by mistake i dragged for vra.
once i dragged it took vms as array to be traversed and bind to local vm parameter .
then made name,description,memory and quiesce as input parameters.
finally it was kind enough to work i will check other workflows with foreach.thanks for your help.