Get a Aria Automation Orchestrator (former vRealize Orchestrator) Configuration Element by Global Tag name
In the post I will show you how to can get an Attribute from a Orchestrator Configuration Element. this is very useful, if you need a Attribute wich is stored in a Configuration element in an Orchestrator Action.
Steps are:
Create a Orchestrator Configuration Element
Navigate to Configuration

Create a NEW Folder or use an existing Folder where you create a new Configuration Element

Create a new Configuration Element

Tag the Configuration Element
Enter a name for the new Configuration Element and create a Tag like this ceID:< ID of Configuration Element>

Create a variable

SAVE the Configuration Element
Create a Action to get a Attribute from the Configuration Element
Navigate to Actions -> Select a Modul -> Create a new Action

Navigate to Script
Add the following Script:
if(tagName && tagValue && attributeName){
var tagQuery = new TagQuery();
addTagFilter(tagName, tagValue, true)
var cfgElements = Server.queryByTags(tagQuery, null);
if(cfgElements != null && cfgElements.length == 1){
for (attribute in cfgElements[0].attributes){
if(cfgElements[0].attributes[attribute].name == attributeName){
if(cfgElements[0].attributes[attribute].value){
return cfgElements[0].attributes[attribute].value;
}
}
}
}else{
throw("Configuration with Tag Name: '" + tagName + "' and Tag Value: '" + tagValue + "' not found or not unique!");
}
}
function addTagFilter(tag, value, isGlobal ){
if (tag != null && tag.length > 0) {
if (isGlobal) {
tagQuery.hasGlobalTag(tag,value);
} else {
tagQuery.hasTag(tag,value);
}
}
}
Create the following Input variables: and return type

CREATE / SAVE the Action
Test the Action
Run the created Action and click on RUN

The Action Result should be as shown below

This Action can be used in other Actions as follow and you can get a Configuration Element Attribute in a Action. For example you can also add a REST Host Object as variable in a Configuration Element and can get this REST Host and use it inside the Action.
System.getModule(“<module Name>”).<Action Name>(<Action inputs, comma separated)>