Profile picture for user MWZ

Step 1 - Output model names

Based on our first “Hello ARIS” report we now want to generate an output document which contains ARIS content. Therefore we create a report which lists all selected models with their names and the names of the contained objects.

For using the selected models in your report you have to enter the following code line:

var aModels = ArisData.getSelectedModels();

And now you can iterate over these models and output their names.

To get the names we have to call method “Name()” with the language as parameter. To get this language we us the following code line:

var nLocale = Context.getSelectedLanguage();    // Selected database language

So the complete script looks as follows:

var oOutput = 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

    oOutput.OutputLn(sModelName, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
}
oOutput.WriteReport();

Step 2 - Output model and object names

In a further step we want to add the names of all objects which are contained in our models.

To get the objects of the models we use the following method:

var aObjDefs = oModel.ObjDefList();         // All object definitions that have occurrences in the model

So that the report now looks like this:

var oOutput = 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

oOutput.OutputLn("Model: " + sModelName, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
    
var aObjDefs = oModel.ObjDefList();         // All object definitions that have occurrences in the model
for (var j = 0; j < aObjDefs.length; j++) {            
var oObjDef = aObjDefs[i];              // Current object definition
var sObjName = oObjDef.Name(nLocale);   // Name of current object
        
oOutput.OutputLn("Object: " + sObjName, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 10);
    }    
}
oOutput.WriteReport();

You can see: Getting names of objects works in the same way as getting names of models.

Here you can download the entire source code from the "Output models" report.

Note: This article describe how to develop a report in ARIS. See this post for links to similar articles.

 

by Corey Holstege
Posted on Tue, 08/17/2010 - 20:33

Hello Mr. Wieczorek,

First off, thank you for this article, it has been very helpful to me.

I put this report in ARIS today, and while i was testing it i noticed one item. On line 24 of your source code (line 13 in the above picture), you have:

var sObjDef = aObjDefs[i];

When i ran the report with the line like this, it returned the same name for all of the objects on the model. It had the correct number of returned names, they were just all the same.

The line of code should be:

var sObjDef = aObjDefs[i++];

If this line is used, the report, when ran will return all of the correct object names.

Thank you!

1
by Ginta Malboro
Posted on Fri, 08/20/2010 - 10:29

I tried your code using IT Architect 7.1 and receives an exection error: "TypeError:Cannot call method "Name" of undefined" in Line 14 of your code. Am I doing things wrong?

1
by Ginta Malboro
Posted on Fri, 08/20/2010 - 10:37

Just realized that the problem is that the code bit was using a different index, though I don't know "how" it causes the error I stated. What it should do instead is to generate object names indexed on the same count "i," generating the same output throughout the inner loop. To the guy who replied before me, instead of "i," you should use "j".

1
by NANDITA SRINIVAS
Posted on Tue, 11/16/2010 - 08:38

what does this line mean,var oModel=aModels[i];

is that the index or the name of the model??

1
by Eva Klein
Badge for 'Community Team' achievement
Posted on Tue, 11/16/2010 - 09:27

Hi Nandita,

var oModel = aModels[i]; 

returns the current model.

For example: you choose two models (EPC1 and EPC2) then you first evaluate the EPC1 and then the EPC2.   There is one error in the report, in this line
var oObjDef = aObjDefs[i];

you must change the "i" into "j". 

Regards

Eva

 

1
by NANDITA SRINIVAS
Posted on Tue, 11/16/2010 - 11:02

in line 13 var oObjDef=aObjDefs[i],

ObjDefs[i] can be changed to aObjDefs[j] .

 

1
by NANDITA SRINIVAS
Posted on Tue, 11/16/2010 - 11:10

hi Eva,

Thanks for the reply.

  • Can the code be applied to a group of models?
  • Is it possible to evaluate 2 /more models simultaneously.
1
by Eva Klein
Badge for 'Community Team' achievement
Posted on Tue, 11/16/2010 - 11:56

 

Hi Nandita

  • No you can't choose a group
  • Yes it is possible to evaluate more than one model

Regards

Eva

1
by NANDITA SRINIVAS
Posted on Tue, 11/16/2010 - 12:34

ok,can you plz tell me the procedure to evaluate more than one model at a time

1
by Eva Klein
Badge for 'Community Team' achievement
Posted on Tue, 11/16/2010 - 12:55
If you use the ARIS Business Architect select the module "Explorer" and open your database.  Click on the folder main group and then choose the models which should be evaluate (in the right window). In the next step you click the right mouse button and choose "Evaluate - Start report". Select your report and that's it.   Is everything clear:)?
1
by Anthony Horner
Posted on Wed, 04/04/2012 - 17:14

In reply to by Frank Weyand

Hi Eva,

Sorry I'm not understanding your instructions.  After opening the main folder group in Explorer, how do I "choose a model to evalute".  Double-clicking on a model opens it up in Designer.  If I do this for multiple models, they are opened up in designer under different tabs.  

Right-clicking Evalute - start report will only let me do this for one model, where am I going wrong?

Regards,

 

1
by Kan Dai
Posted on Thu, 04/24/2014 - 09:53

In reply to by A Horner

I guess I got the idea. In the Explorer, single click the Group/Directory, you will see the list of models under this Group/Director in the "right" window panel, where you can use Ctrl key or Shift key to multi-select more than one models.

1
by NANDITA SRINIVAS
Posted on Tue, 11/16/2010 - 13:03

Thanks a lot,it worked!!!

Regards,

Nandita

1
by NANDITA SRINIVAS
Posted on Thu, 12/02/2010 - 07:57

Hi Eva,

I have a doubt in designer module of ARIS .I want to change process id attribute across a  group of models(say 200 models).Is there any simple method by which I can update them as a whole  instead of going into each model and changing the attribute.

Regards,

Nandita

 
1
by Fadi Darani
Posted on Tue, 02/01/2011 - 13:33

thank you for this Articel

Regards,

Fadi

1
by nicolas cofre
Posted on Tue, 07/19/2011 - 23:48

it's working! 

Thanks a lot

 

 

Nico

1
by Faris adel
Posted on Tue, 06/20/2017 - 11:07

No Output , empty page :( 

how to add model to show details in page ? 

1
by Runé Becker
Badge for 'Mastermind' achievement
Posted on Wed, 06/21/2017 - 12:01

In reply to by ahmad.theeb

Dear Ahmad,

The above discussion is almost 7 years old. It refers to an ARIS version which you are probably not using. Except from that, your didn't provide sufficient information to respond with helpful tips.

I suggest you ask your question as new post along with information such as ARIS product + version, what you did, what you did expect to happen, and what happened instead.

Cheers

Rune

1
by Arda Ay
Posted on Thu, 09/27/2018 - 16:38

Hi,

First of all, I want to thank you for your articles. I searched a lot but didn't find any article or tutorial in the internet that teaches me like these ones.

Everything is fine, but when report is created, all objects of a model is written mixed, not sorted. Is there a way to write them in the order of their index or something?

Thanks a lot

Arda

1
by Runé Becker
Badge for 'Mastermind' achievement
Posted on Fri, 09/28/2018 - 16:36

In reply to by ArdaAy

Dear Arda,

You replied to a discussion which started years back. I suggest to ask your question as a new post into this forum, because then everyone can read it. And please provide more details of what you tried and what you expect to happen. At best with screenshots of sample data.

Cheers

Rune

1

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

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