VMware Cloud Community
mg1978
Enthusiast
Enthusiast
Jump to solution

How to change the name of a Workflow Run

Hi All,

we have a self service portal based on the orchestrator and it works very good. We deployed since January more the 300 VMs over this portal.

I would like to change the name of the workflow run to the name of the user which start the run. I have a action (getCurrentLdapUser) where I get the name of the requester.

The problem is to find a run under all the requests, because the runs are named like the workflow and only the date and time are there.

Have somebody an idea if this is possible? If the requester submit the request and the workflow run starts to change the name of this to the requester name + date and time ?

0 Kudos
1 Solution

Accepted Solutions
cdecanini_
VMware Employee
VMware Employee
Jump to solution

Solution here : http://www.vcoteam.info/learn-vco/code-snippets-change-the-name-of-a-workflow-run.html

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

0 Kudos
3 Replies
ChristianWehner
VMware Employee
VMware Employee
Jump to solution

Hi,

within a Scriptable task workflow will return you the current workflow run as WorkflowToken. The attribute WorkflowToken.name is read-only attribute (untested but documented) so I think you have no change to change this. But you can test this.

Regards,

Chris

0 Kudos
ChristianWehner
VMware Employee
VMware Employee
Jump to solution

OK I tested it. You can't set WorkflowToken.name to any other value.

workflow.name = "None";

System.warn( workflow.name );

Name wasn't changed Smiley Sad

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

Solution here : http://www.vcoteam.info/learn-vco/code-snippets-change-the-name-of-a-workflow-run.html

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos