Code snippets : Change the name of a workflow run

In some use cases you may want to customize the name of the workflow run/execution to suit your needs. For example it may be more practical to browse the workflow runs with having the name of the object the operation ran on such as "Deploy vApp tcWebServer" instead of the default "Deploy vApp". It can also be usefull if you use the workflow run as a way to identify a particular one from an external application having an ID for it. You can always add this ID as an input variable and search matching IDs in all the workflow runs but it makes it a bt more complicated. The issue with this is that the workflow run uses the name of his parent workflow by design. Some of my colleagues found ways to hack into the vCO database but there is a simpler solution.

Warning: The following is not documented, not supported and may not work in future vCO versions.

Edit the workflow you want to have custom workflow run name. Add a __tokenName input

alt

Now in the presentation add a "Show parameter input" set to false to this will not show up when starting a workflow and a "Default value" with custom title (Here the original name of the workflow + name of the main input parameter and the user name.

alt

Save & close, test your workflow. Voila !

alt