5 Replies Latest reply on Sep 29, 2016 5:28 AM by john23

    Query for vRo

    john23 Expert

      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.

        • 1. Re: Query for vRo
          iiliev Champion
          VMware EmployeesCommunity Warriors

          Hi,

           

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

          • 2. Re: Query for vRo
            john23 Expert

            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.

            • 3. Re: Query for vRo
              iiliev Champion
              VMware EmployeesCommunity Warriors

              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.

              1 person found this helpful
              • 4. Re: Query for vRo
                jacksonecac Enthusiast

                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.



                • 5. Re: Query for vRo
                  john23 Expert

                  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