I am trying to find action references with a workflow, but have no success in linking action ID with anything else.
I want to get a similar output as right clicking an action and selecting 'References->Find elements that use this element'.
So is there a way to list all actions used in a workflow or just plain listing all the elements that use a specific action?
I've searched through Action and Workflow objects with no success.
Thanks in advance,
Hi,
Actions are not referenced by their IDs when used eg. in workflows, but by action's module name and action name. For example, here is how the invocation of vim3WaitTaskEnd action from workflow Create simple virtual machine looks like:
actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,progress,pollRate) ;
So if you want to search for usages of an action in other elements, you have two options:
1) Use some kind of Javascript parser to parse the code where you want to look, build an AST, and locate the nodes representing the action call, or
2) Use a simple string/pattern matching
Both approaches has their pros and cons (mostly cons, unfortunately).
My use case is - our environment has a few 100 actions in which a lot of them have become deprecated.
Finding them by hand and deleting them is a very time-consuming task and we want to automate it.
Hi,
Actions are not referenced by their IDs when used eg. in workflows, but by action's module name and action name. For example, here is how the invocation of vim3WaitTaskEnd action from workflow Create simple virtual machine looks like:
actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,progress,pollRate) ;
So if you want to search for usages of an action in other elements, you have two options:
1) Use some kind of Javascript parser to parse the code where you want to look, build an AST, and locate the nodes representing the action call, or
2) Use a simple string/pattern matching
Both approaches has their pros and cons (mostly cons, unfortunately).