VMware Cloud Community
imtrinity94
Enthusiast
Enthusiast
Jump to solution

Access workflow item inside scriptable task

Is there a way to get the workflow item name inside the same scriptable task? (For eg, item0 is a scriptable tasks with name = Rename a VM)


Mayank Goyal
vRO Engineer
https://www.linkedin.com/in/mayankgoyal1994/
https://cloudblogger.co.in/
Labels (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
emacintosh
Hot Shot
Hot Shot
Jump to solution

I think this will get it for you?  

System.currentWorkflowItem().getDisplayName()  // get "Rename a VM"
System.currentWorkflowItem().getName()    // get the Item0

View solution in original post

Tags (1)
Reply
0 Kudos
4 Replies
emacintosh
Hot Shot
Hot Shot
Jump to solution

I think this will get it for you?  

System.currentWorkflowItem().getDisplayName()  // get "Rename a VM"
System.currentWorkflowItem().getName()    // get the Item0
Tags (1)
Reply
0 Kudos
imtrinity94
Enthusiast
Enthusiast
Jump to solution

Thanks mate. I just overlooked this method earlier.


Mayank Goyal
vRO Engineer
https://www.linkedin.com/in/mayankgoyal1994/
https://cloudblogger.co.in/
Reply
0 Kudos
xian_
Expert
Expert
Jump to solution

Is this a vRO8 thing only? Works fine with vRO 8.3 but fails with vRO 7.6

Reply
0 Kudos
emacintosh
Hot Shot
Hot Shot
Jump to solution

According to the article I was referencing (below), it does seem like this approach is available starting in 8.0.  Not sure if there is a 7.x equivalent...

How To get currently executed item name in vRO - Ivo Gaydajiev's Blog