function main(){ var myMap = new java.util.HashMap(); var allModels = ArisData.getSelectedModels(); if (allModels.length == 0){ //we need to split the different GUID of models we have received var allGuids = Context.getProperty("guidlist").split(","); for (var i = 0; i < allGuids.length; i++){ allModels.push(ArisData.getActiveDatabase().FindGUID(allGuids[i])); } } myMap = library.createMapByAttributeValue(allModels, AT_XYZ); var it = myMap.keySet().iterator(); var processAutomationComp = Context.getComponent("Process"); while (it.hasNext()){ var key = it.next(); var arrOfmodels = myMap.get(key); processAutomationComp.run(PROCID_ARESVALIDATION, arrOfmodels); } } main();