VMware Cloud Community
KOBIN
Enthusiast
Enthusiast

Batch workflow does not run

I am trying to run Batch workflow but I cannot run it.I want to run a workflow on a selection of objects. I issued Start workflow on the workflow.

The parameter fill dialog appears and I can fill object selection parameters but I cannot fill workflow field. When I tried to fill the workflow field, the selectio dialog appears but the selections are empty with nothing found message. Is there any way to fill the workflow field ? I am using vCO 4.2 with vC 4.1.

Reply
0 Kudos
7 Replies
lavinka
VMware Employee
VMware Employee

Hi,

Did you trie to run the "FIll batch configuration workflow" before this.

It is necessary in order to populate the necessary workflow/aciton elements for your configuration..

Thanks

Reply
0 Kudos
dvatov
VMware Employee
VMware Employee

Try to press Enter in the search box or enter some filter criteria. Initially the lists are empty. Can you give the exact name of the workflow you are trying to execute?

Reply
0 Kudos
KOBIN
Enthusiast
Enthusiast

I found the following:

http://blogs.vmware.com/orchestrator/2011/10/no-code-workflow-reconnects-esxi-hosts.html

I was trying to use the workflow in directly. I created my own workflow and put run workflow on a selection of objects into the workflow and I can run batch operation.

But this is not my goal. I want to execute a workflow on the vms in a folder or a host. I cannot find the actions to retrieve the vms in a folder or a host. Is it in the library (or I must write a code ?) ?

Reply
0 Kudos
lavinka
VMware Employee
VMware Employee

In general there are following predefined actions available in the library:

getAllVMsOfHost

getAllVirtualMachinesByFolder

getAllVMsOfCluster

getAllVMsOfDatacenter

and also additional more.

You can check them, just paste the above names in the Search dialog (Upper Right corner of the Orchestrator Client) and verify which of them works for you.

Thanks

KOBIN
Enthusiast
Enthusiast

I may found the reason why I could not use "run workflow on a selection of objects" directly.

My own workflow's attribute Genral->attributes is empty.

"run workflow on a selection of objects" has some attributes. I copied them to my own workflow and the problem occurs again.

Actions in the attributes does not return list of workflows or list of actions.

Reply
0 Kudos
KOBIN
Enthusiast
Enthusiast

Thanks a lot !

I could issue "Run a workflow on a selection of objects" on VMs in a folder. Following are the steps I have issued:

1) Create my own workflow ant put "Run a workflow on a selection of objects".

2) Delete configElementAction and wftokens in Attributes section in General tab to show list of workflow and actions in the presentation.

3) Open Presentation tab.

4) Expand Workflow->Workflow.

5) Open workflowsParam.

6) Edit Predefined list of elements: first and sectond #configEI->"VirtualMachine" to show all the workflows for a VM.

Reply
0 Kudos
KOBIN
Enthusiast
Enthusiast

"Run a workflow on a selection of objects" in the library does not wait the completion of each task.

I duplicated "Run a workflow on a selection of objects" and edit it as follow:

1) Duplicated "Run a workflow on a selection of objects".

2) Open Schema->Execute Workflows

3) Open Scripting.

4) Put

System.getModule("com.vmware.library.vc.basic").waitForCompletionForBatchWorkflow(wfTokens) ;

after

var wfToken = workflowsParam.execute(workflowParameters);
System.log("object["+i+"]: '"+actionResult[i].name +"' => The workflow is running... ");
wfTokens.push(wfToken);

5) Replace "Run a workflow on a selection of objects" in my own workflow by it.

Reply
0 Kudos