Profile picture for user Volker Eckardt

Hello Community,

I think it is time now to start with the first data listing out of Aris Architect. You may have seen the Hello World, and already tried it. This time the number of commands will grow, but the main steps are the same.

What we are going to do is this listing, a plain list of main model attributes + attributes from selected object occurences. To run it, open a model of your choice, select one or many functions and run the report, You will get a list like this:

Now, let's start how to build this:

Step 1: Create, if not yet done, a new Category for your custom reports.

Step 2: Name it accordingly, to identify the content

Step 3: And begin now with a new report

Step 4: Fill in the Values for the Report definition

Step 5: Select the objects you are going to list in the report

Here we select Events and Functions.

Step 6: Choose the default Layout

Excel is not yet supported by this report, therefore we select plain text only (PDF, ...)

 

Continue with wizard step 4 and click on [OK]

Hint: If you select here "Enter source text (code view), then you can continue directly with step 9. In this case no layout will be created. Please make sure that you are selecting at least PDF as output type.

 

Step 7: Review the result.

The wizard assumes that you are going to create a report with layout, therfore some content data are already there, but ...

 

Step 8: Change to Script editor and remove the Content

... as we are going to create our own, we will remove everything.

That's the generated code:

Select everything and hit the [Delete] button.

Now press [save] and accept the warning.

Step 9: Now we are beginning to code

Usually a code starts with some constants. In this case it is a language constant (we need it to read the attribute names correctly). 

Below that we start immediately with the main function. In fact it will not be called here, but it will be defined. With the Context we define a handler for the outfile, set the format we are going to use and get a list of all selected objects.

If at least one object has been selected, we will continue and loop through this list. The current object we track in currObject.

To make the report a little bit more complete, we are reading some general values like the model name, the group etc. And also the current filter.

We will now print the selected data above immediately (to be precise: prepare for printing).

And will now take care about the object attributes itself. In this first part we list only maintained attributes. A custom function will provide this information. The print out is again a list.

In a second part we are printing the oposite, which means all not maintained attributes. You see this small ! in front, this will do the job for us.

A little bit of summary, and a final go for the report to write.

Below the closing "}" we have some helper functions. This simple function will determine if the attribute is maintained or not.

And the second will just define an output style.

 

Because the engine does not recognize the main function automatically, we have to call it here.

 

How to start?

Open a model, click on one or on multiple objects in it, and select "Evaluate" > "Start Report ...". Select your report category and let it run.

 

 

Final note:

This tutorial helps you to get a better understanding how JavaScript works inside ARIS. You may find easier or better solutions to provide the same - please use this community to share your thoughts. I am going to extend this first version step by step and will make it more complete.

Any kind of feedback is very welcome!

Download



Please download the report file from here

Next Article

In the next article we are going to change the output to Excel and will discuss special enhancements to get a nicer output.

Related Articles

Best regards

Volker

by Ahmad Fares
Posted on Wed, 05/12/2010 - 11:01

 

do you have this script ?

1
by Volker Eckardt Author
Posted on Wed, 05/12/2010 - 12:14

In reply to by Darlene Hinkle

Hi Ahmad,

thanks for your question. I am not sure if I understand your question correctly. What kind of objects you like to delete? If you can select an object, why can you not delete it via "Delete"?

Regards, Volker

1
by Ahmad Fares
Posted on Wed, 05/12/2010 - 12:30

 

thank you

1
by Ahmad Fares
Posted on Wed, 05/12/2010 - 12:33

 

 

thanks

1
by Test Test
Posted on Thu, 05/13/2010 - 11:48

Hi Volker,

I need some help with the script template.....I have created a template but the problem is when i run a report i am getting only the Business Process flow EPC diagrams, but the report does not contain the value chain, KIP, function allocation diagram,

I have used the below script in the report template,

 

1 {Selected groups.Model list (filterable by type).Name}

{Selected groups.Model list (filterable by type).Graphic}

 

Please guide me.

 

Thanks,

Balaji

1
by Volker Eckardt Author
Posted on Thu, 05/13/2010 - 14:33

Hi Balaji,

thanks for your question. I assume your issue belongs rather to the wizard than to code? But if I understand you right, please enable the model types you like to report in the "context" window. You can also get into later by opening the properties for your report.

In section "context" review the checked model types and add additional if required (see also Step 5 above). 

Keep in mind that the JavaScript based reports here in the tutorial don't support model selection except from part 6 onwards. The wizard generated solution from part 3 can be enhanced with the given steps above to work with any model type and/or object type.

Hope this helps!

Best regards, Volker

1
by Test Test
Posted on Thu, 05/13/2010 - 14:47

Hi Volker,

 

Thank you so much for your response, i have already selected the model in the Context, please find the attached screen shot.

 

Not sure why my reports are coming like that, can i have your mail id so that i can send you the template.

 

Thanks,

Balaji

1
by Ludo Beckers
Posted on Wed, 06/16/2010 - 14:05

What happened here? The script has a "lock" on it, and I can't alter its contents anymore.

This happened after running the report; it went straight to this locked state instead of opening the report results (or error report).

Help appreciated :-) thanks.

1
by Volker Eckardt Author
Posted on Thu, 06/17/2010 - 09:21

In reply to by sstein

Hi Ludo,

the lock will come automatically if you run the report in the code view or debug mode. Just hit the run button on top to let it go.

When the execution is over the output window (e.g. Excel or PDF, ...) should open and the lock should go away.

Hope this helps.

Volker

1
by Ludo Beckers
Posted on Thu, 06/17/2010 - 13:15

Hi Volker,

I understand, thank you :-)

Ludo

1
by Se Hyoung Yoo
Posted on Wed, 01/26/2011 - 05:42

Hi Volker,

I have executed this scrpt, but it takes no message like the above mentioned

==================================================

Database    = 

Language Id    =

Curr Filter Name = 

Model Name =

Model Group = 

Model Group Path = 

==================================================

Only I have got "Please select a valid object occurence! "

I need a help to get a real data like your list.

Thanks for your help. 

1
by Volker Eckardt Author
Posted on Wed, 01/26/2011 - 22:44

Hi Se Hyoung,

Well, this message tells you that you should select an object (function) and then via right-mouse -click run the report (see section "How to start?" above).

Have you done it like that?

Regards

Volker

1
by Sukanya Nagarajan
Posted on Tue, 08/23/2011 - 09:58

i found some error in Constants.AT_SYSTEM_TYPE . can anyone guide me , what value should i pass for that and where should i find that value

1
by Liju Ram
Posted on Wed, 08/16/2017 - 15:27

Can anyone tell me what is the use of String table while writing Aris script? For the scripts i wrote, String table is empty. I am not able to comprehend how to effectively make use of String Table while scripting. Thanks in advance.

1
by Fedor Stroganov
Posted on Fri, 02/15/2019 - 07:55

Hello, Volker!

Could you help me please? Why I can't see "Use report script template (design view)" in my Script wizard (ARIS BA 7.0.2). I send some screenshots.

File attachments
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