Profile picture for user selimgokce

Hello All i wish to obtain a list of this table as an Aris Report. 

 

 

I have obtained but I merged 4 Aris Standart reports and made many manuplations (matrix report, object list report....).

Is there any other easy way to obtain this table. 

 

Thanks

by Eva Klein
Badge for 'Community Team' achievement
Posted on Thu, 11/25/2010 - 15:47

Hi Selim,

if I understand you correctly, it should not be so difficult to solve the problem.

First you need all connections in a model:

var oCxnOccs = oModel.CxnOccList(); //for example all connections in a model

Then you iterate over the array of connections to find out what is the source and the target of every connection:

 for(var j=0; j<oCxnOccs.length;j++){
        var oCxnOcc = oCxnOccs[j];
        var oSourceObjOcc = oCxnOcc.SourceObjOcc();     
        var sourcetype = oSourceObjOcc.ObjDef().Type(); // get type of source object
        var nSource = oSourceObjOcc.ObjDef().Name(nLocale); // get name of source object
        var nCxn = oCxnOcc.Cxn().Name(nLocale); // get name of connection
        var oTargetObjOcc = oCxnOcc.TargetObjOcc();     
        var targettype = oTargetObjOcc.ObjDef().Type(); // get type of target object
        var nTarget = oTargetObjOcc.ObjDef().Name(nLocale); // get type of target object
 }

Now that you have all the required information you just need the output of it =).

For example:

var oOutputFile = Context.createOutputObject();     // Output object
var nLocale = Context.getSelectedLanguage();    // Selected database language

var aModels = ArisData.getSelectedModels();     // Array of selected models
for (var i = 0; i < aModels.length; i++) {            
    var oModel = aModels[i];                    // Current model
    var sModelName = oModel.Name(nLocale);      // Name of current model
    var oCxnOccs = oModel.CxnOccList(); //for example all connections in a model
    
    oOutputFile.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);          
    //table header
    oOutputFile.TableRow();
    oOutputFile.TableCell("ModelName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
    oOutputFile.TableCell("SourceType", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
    oOutputFile.TableCell("SourceName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
    oOutputFile.TableCell("ConnectionName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
    oOutputFile.TableCell("TargetType", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);                
    oOutputFile.TableCell("TargetName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);                
   
    for(var j=0; j<oCxnOccs.length;j++){
        var oCxnOcc = oCxnOccs[j];
        
        oOutputFile.TableRow();
        oOutputFile.TableCell(sModelName, 20, getString("TEXT_1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
    
        var oSourceObjOcc = oCxnOcc.SourceObjOcc(); 
        var sourcetype = oSourceObjOcc.ObjDef().Type();
        var nSource = oSourceObjOcc.ObjDef().Name(nLocale);
        oOutputFile.TableCell(sourcetype, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
        oOutputFile.TableCell(nSource, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
  
        var nCxn = oCxnOcc.Cxn().Name(nLocale);
        oOutputFile.TableCell(nCxn, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
    
        var oTargetObjOcc = oCxnOcc.TargetObjOcc();      
        var targettype = oTargetObjOcc.ObjDef().Type();
        var nTarget = oTargetObjOcc.ObjDef().Name(nLocale);
        oOutputFile.TableCell(nTarget, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
        oOutputFile.TableCell(targettype, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
    }
}
oOutputFile.EndTable("", 100, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutputFile.WriteReport();

I hope this helps you, I have not tested it very extensively, but it should work:).. 

Regards

Eva

 

1
by Selim Gokce Author
Posted on Fri, 11/26/2010 - 00:33

Thanks Eva, 

First of all, I would like to thank you for your interest. It works fine but i have no idea about script. I have added and run :) 

I need this solution as Group-based. Your solution was Model-based. I will run this report group by group (included 30-40 epc models). 

 

 

0
by Ozlem Ayav
Posted on Fri, 11/26/2010 - 09:59

Hi Selim,

If I understood true you want to obtaine report for group models not just one model.

Try to select the models via "explorer module" (you can't run group attributes with designer module) and push F8 button. With this way you can get a table for selection model attributes.

 

I hope this helps you..

0
by Selim Gokce Author
Posted on Fri, 11/26/2010 - 10:54

Hi Özlem,

You understood true but it doesn't work. I think script must be Group-Based. 

 

 

Thank you for your interest

0
by Eva Klein
Badge for 'Community Team' achievement
Posted on Mon, 11/29/2010 - 13:37

Hi Selim,

You must change the source in the following way.

First you need all selected groups:

var aGroups = ArisData.getSelectedGroups();

Then you iterate over the array of selected groups to find out which models are in the group:

var oOutputFile = Context.createOutputObject();     // Output object
var nLocale = Context.getSelectedLanguage();    // Selected database language
var aGroups = ArisData.getSelectedGroups(); 

for (var l=0;l<aGroups.length;l++){
   
    var aModels = aGroups[l].ModelList();     // Array of selected models
    for (var i = 0; i < aModels.length; i++) {  
        oOutputFile.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);  
               
        var oModel = aModels[i];                    // Current model
        var sModelName = oModel.Name(nLocale);      // Name of current model
        var oCxnOccs = oModel.CxnOccList(); //for example all connections in a model
        
               
        //table header
        oOutputFile.TableRow();
        oOutputFile.TableCell("ModelName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
        oOutputFile.TableCell("SourceType", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
        oOutputFile.TableCell("SourceName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
        oOutputFile.TableCell("ConnectionName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);         
        oOutputFile.TableCell("TargetType", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);                
        oOutputFile.TableCell("TargetName", 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VTOP, 0);                
       
        for(var j=0; j<oCxnOccs.length;j++){
            var oCxnOcc = oCxnOccs[j];
            
            oOutputFile.TableRow();
            oOutputFile.TableCell(sModelName, 20, getString("TEXT_1"), 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
        
            var oSourceObjOcc = oCxnOcc.SourceObjOcc(); 
            var sourcetype = oSourceObjOcc.ObjDef().Type();
            var nSource = oSourceObjOcc.ObjDef().Name(nLocale);
            oOutputFile.TableCell(sourcetype, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
            oOutputFile.TableCell(nSource, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
      
            var nCxn = oCxnOcc.Cxn().Name(nLocale);
            oOutputFile.TableCell(nCxn, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
        
            var oTargetObjOcc = oCxnOcc.TargetObjOcc();      
            var targettype = oTargetObjOcc.ObjDef().Type();
            var nTarget = oTargetObjOcc.ObjDef().Name(nLocale);
            oOutputFile.TableCell(nTarget, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
            oOutputFile.TableCell(targettype, 20, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);         
        }
        oOutputFile.EndTable("", 100, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
    }
}

oOutputFile.WriteReport();

I hope it works:). The following tutorials will be a good introduction to the world of ARIS scripting.

Regards

Eva

 

0
by Selim Gokce Author
Posted on Tue, 11/30/2010 - 09:39

it works, thank you for your help

Best Regards

Selim

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