5 Replies Latest reply on Sep 19, 2019 4:29 AM by iiliev

    How to tag a workflow/Action

    LaxmiRagi Novice

      Hi There,

       

      I wanted to understand what is tagging and how it works.

       

      I have seen some examples online and in the Vro Library>tagging>...

       

      Q1. When running Tag workflow from Library>> tagging>> Tag workflow >> I can see the Tag text field, so what was tag meant for? and what was the value meant for?

      Q2. Is it possible to tag for the specific folder?

       

      Please suggest me easiest way to tag workflows/actions and retrieve with tag names.

       

      Thank you in advance.

       

      --Laxmi

        • 1. Re: How to tag a workflow/Action
          iiliev Champion
          VMware EmployeesCommunity Warriors

          Hi,

           

          Tags are strings (3..64 characters in length, no spaces) that you can 'attach' to objects.

           

          To answer your Q1 - 'Tag' field is the name of the tag you want to attach to the workflow, and 'Value' is the optional value of this tag.

           

          About Q2 - I'm not sure that I fully understand the question. Do you want to attach a tag to a folder in a way that all workflows within this folder will get this tag? Or something else?

           

          The Server scripting object exposes some API to attach tags, query for objects having a given tags, etc. Check the documentation in API Explorer and look for methods that have 'tag' in their name.

           

          For example, the snippet below is provided in the documentation to show how you can query for objects that have been tagged with a given tag. Also, you can check the scripting code of the example workflows in the Library > Tagging folder.

           

          // Must return all objets tagged with 'tag1' having value 'value1' and 'globaltag' with value 'value2'
          // type is optional, if null no filtering by type is performed
          var objects = Server.queryByTags(([{'tag':'tag1', 'value':'value1'},{'tag':'globaltag', 'value':'value2'}], "Workflow");
          
          
          • 2. Re: How to tag a workflow/Action
            LaxmiRagi Novice

            Hi Ilian Iliev,

             

            Thank you for quick response, regarding Q2, Yes I want to tag a folder where all workflows are placed. So that I can get all workflows with that tag. (I can tag a folder instead of tagging every workflow in that folder)

             

            So please confirm me if I can able to tag a folder where all workflows are placed.

            • 3. Re: How to tag a workflow/Action
              iiliev Champion
              VMware EmployeesCommunity Warriors

              Yes, it is possible to tag a folder (which is of type WorkflowCategory) instead of individual workflows. The same API that you use to tag a workflow will work also for WorkflowCategory.

              • 4. Re: How to tag a workflow/Action
                LaxmiRagi Novice

                Hi Ilian Iliev,

                 

                Thank you so much for confirming.

                Can we tag a folder(package com.companyname.foo) which contains actions too?

                • 5. Re: How to tag a workflow/Action
                  iiliev Champion
                  VMware EmployeesCommunity Warriors

                  You can tag the whole Package object, the same way you tag Workflow and WorkflowCategory objects.