JK
I am trying to find an ARIS report that will list all objects and their corresponding file locations so that we can better manage our ARIS objects. We are trying to consolidate object locations where necessary.
Thanks
Hi,
Please find the below, this report will give you Org Units, Systems, and Roles and their respective folder path where the objects are existing. You can modify the report to add Functions and Events as per your requirement.
var outFile = null; var g_nloc = null; function main(){ var groups = null; groups = ArisData.getSelectedGroups(); g_nloc = __toLong(Context.getSelectedLanguage()); outFile = Context.createOutputObject(Context.getSelectedFormat(), Context.getSelectedFile()); outFile.Init(g_nloc); formatOutput(outFile); outFile.BeginTable(100, Constants.C_BLACK, Constants.C_WHITE, Constants.FMT_LEFT, 0); outFile.TableRow(); outFile.TableCell("Model name", 24, getString("TEXT1"), 14, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); outFile.TableCell("Object Name", 24, getString("TEXT1"), 14, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); outFile.TableCell("Object Path", 24, getString("TEXT1"), 14, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); for(var i = 0; i < groups.length; i++) { // iterate through all groups var j = 0; var k = 0; var models = groups[i].ModelListFilter(Constants.MT_EEPC); for(k = 0; k < models.length; k++){ // iterate through all models in the group checkModel(models[k]); } var childGroups = groups[i].Childs(true); for(j = 0; j < childGroups.length; j++){ //iterate through all sub groups var m = 0; var childModels = childGroups[j].ModelListFilter(Constants.MT_EEPC); for(m = 0; m < childModels.length; m++){ // iterate through all models in the group checkModel(childModels[m]); } } } outFile.EndTable("", 100, getString("TEXT1"), 12, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); outFile.WriteReport(Context.getSelectedPath(), Context.getSelectedFile()); } function checkModel(model){ var modelLevel = getLevel(model); var i = 0; var OrgUnits = model.ObjOccListFilter(Constants.OT_ORG_UNIT); var Roles = model.ObjOccListFilter(Constants.OT_PERS_TYPE); var Systems = model.ObjOccListFilter(Constants.OT_APPL_SYS_TYPE); if((modelLevel == 3)||(modelLevel == 4)){ for(i = 0; i < OrgUnits.length; i++) { var OrganizationUnits = OrgUnits[i].ObjDef(); writeModelName(model); outFile.TableCell(OrgUnits[i].ObjDef().Name(g_nloc), 50, getString("TEXT1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); var orgUnitPath = OrganizationUnits.Group().Path(g_nloc); outFile.TableCell(orgUnitPath, 50, getString("TEXT1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); } for(var j = 0; j < Roles.length; j++) { var roless = Roles[j].ObjDef(); writeModelName(model); outFile.TableCell(Roles[j].ObjDef().Name(g_nloc), 50, getString("TEXT1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); var RolesPath = roless.Group().Path(g_nloc); outFile.TableCell(RolesPath, 50, getString("TEXT1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); } for(var k = 0; k < Systems.length; k++) { var systemss = Systems[k].ObjDef(); writeModelName(model); outFile.TableCell(Systems[k].ObjDef().Name(g_nloc), 50, getString("TEXT1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); var SystemsPath = systemss.Group().Path(g_nloc); outFile.TableCell(SystemsPath, 50, getString("TEXT1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); } } } function writeModelName(model){ outFile.TableRow(); outFile.TableCell(model.Name(g_nloc), 50, getString("TEXT1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER, 0); } function getLevel(model){ var modelLevelAttr = model.Attribute(Constants.AT_USER_ATTR5, g_nloc); return modelLevelAttr.getValue(); } main();