vCenter Orchestrator references workflows by ID and allows to have multiple workflows with the same name. If the workflows you are calling have a unique name you can write a vCO wrapper to find a workflow by name with the following code.

Input: wfName (string)

Output: wfByName (Workflow)

var workflows = Server.findAllForType("Workflow", "'"+wfName+"'");

var wfByName = null;

if (workflows != null){

 if (workflows.length == 1){

   System.log("Match found for workflow named: "+wfName);

   wfByName = workflows[0];


   System.log("More than one VM found with that name! "+wfName);

   for each (wfl in workflows){

     System.log("Workflow ID: ";



The interesting part is the second parameter of the findAllForType method : it is a query running on the server side, hence making the find a lot quicker than getting all the workflows and iterating through them to get the ones with the matching name.