VMware Cloud Community
john23
Commander
Commander
Jump to solution

Query for vRo

Hi, Anyone usage namespace in vRO. I have two workflow in different namespace, can i specify the workflow which one to use, without creating action.

Thanks -A Read my blogs: www.openwriteup.com
Reply
0 Kudos
1 Solution

Accepted Solutions
jacksonecac
Enthusiast
Enthusiast
Jump to solution

Another way is to write it in a script and make a call dynamically.

  • var inputProperties = new Properties(); 
  •  
  • inputProperties.put("inputParameter1", inputParameter1); 
  • inputProperties.put("inputParameter2", inputParameter2); 
  •  
  • workflowToken = myWorkflow.execute(inputProperties);

Check out this site to see the Workflow API

http://www.vroapi.com/Class/Intrinsics/1.0.0/Workflow

I know there is also a way to set the workflow id. I can't remember off the top of my head but you could do something like

var firstworkflow = '<workflow_unique_id>'

var secondworkflow = '<workflow_unique_id2>'

if( some condition )

     workflowToken.id = first workflow token

else

      workflowToken.id =  second workflow token

then call the workflow like above. Like I said I forget how to actually set the workflow id but im sure a little digging with this information should be easy to find.



View solution in original post

Reply
0 Kudos
5 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

I'm not sure I understand the question. Could you provide an example/more details?

Reply
0 Kudos
john23
Commander
Commander
Jump to solution

In VRO, I have two same name workflow "findvm" but in different folder. I want to use one of the workflow(from my choice), not want to create action, how can i point to the workflow of my choice.

Thanks -A Read my blogs: www.openwriteup.com
Reply
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

If by 'use' you mean you want to call this workflow from another workflow and when you drag&drop workflow element on the schema, the workflow name chooser that popups automatically is shown as a list where you can not distinguish easily one 'findvm' from another, then you have 2 options.

First option is to single-click on one of 'findvm' items in the list and wait a bit - a tooltip will be opened showing additional info, and the folder name will be available there.

Second option is to replace this workflow name list chooser with a tree chooser. In the vRO Java client, click on menu 'Tools' -> 'User preferences', then select 'Workflows' tab in the left pane, and then check 'Display workflows in a tree view' checkbox. The next time you drag&drop a workflow item element, a tree chooser will be opened.

jacksonecac
Enthusiast
Enthusiast
Jump to solution

Another way is to write it in a script and make a call dynamically.

  • var inputProperties = new Properties(); 
  •  
  • inputProperties.put("inputParameter1", inputParameter1); 
  • inputProperties.put("inputParameter2", inputParameter2); 
  •  
  • workflowToken = myWorkflow.execute(inputProperties);

Check out this site to see the Workflow API

http://www.vroapi.com/Class/Intrinsics/1.0.0/Workflow

I know there is also a way to set the workflow id. I can't remember off the top of my head but you could do something like

var firstworkflow = '<workflow_unique_id>'

var secondworkflow = '<workflow_unique_id2>'

if( some condition )

     workflowToken.id = first workflow token

else

      workflowToken.id =  second workflow token

then call the workflow like above. Like I said I forget how to actually set the workflow id but im sure a little digging with this information should be easy to find.



Reply
0 Kudos
john23
Commander
Commander
Jump to solution

Is there a possiblity to pass with foldername/workflow name  in script.

example hireracy

test   

     findvm

test1 

     findvm

Can i pass in script test/findvm or test1/findvm ?? is it possible

Thanks -A Read my blogs: www.openwriteup.com
Reply
0 Kudos