How To get currently executed item name in vRO

How To get currently executed item name in vRO

Each workflow item has internal name which is auto generated by vRO platform. It looks like “item1” and can be spotted in logs . There is also item display name which is configurable by workflow author at design time and is shown in workflow schema editor . Starting with vRealize Orchestrator 8.0 there is easy way to access item name and item display name of currently executed item from the scripting element itself.

Here is an example…

// Item name is auto-generated by the platform
name = System.currentWorkflowItem().getName();
System.log("Name: " + name)

// Item Display name can be specified by workflow author.
itemDisplayName = System.currentWorkflowItem().getDisplayName();
System.log("Display name: " +  displayName)

And output from one example workflow run should look like …

Example workflow run printing current item name

Leave a Reply

Your email address will not be published. Required fields are marked *