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

by Srinivas CH
Posted on Thu, 04/18/2013 - 09:30

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();
0

Featured achievement

Genius
You like to help others solve their problems by answering questions.
Recent Unlocks
  • KF
  • KH
  • RG
  • Profile picture for user Vee_ARIS
  • Profile picture for user smarty
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock