Profile picture for user MWZ

Every developer knows a first step to learn a new programming language is writing a “Hello World” program. Today, I want to share with you how to write a small ARIS report doing exactly that.

Step 0 - Precondition

To write a new report, you have to switch to the module “Script” in ARIS Business Architect. There, you have to select an existing category in the folder “Reports” or create a new folder.

Step 1 - Creating a new report

Right click on an existing report category to bring up the context menu and select ”New\Report”.

A wizard is shown guiding you through the first steps to configure a new ARIS report. On the first page, enter the report name:

On second page, select a context (e.g. ‘Model’). The context specifies where the new report will be available. For example, if a report does an analysis on Access Diagrams, you can configure that the report can only be started on such models.

On the third page, select option “Enter source text (code view)”. ARIS also provides a WYSIWYG (“what you see is what you get”) report editor, but as we want to learn the programming language, we want to write the code on our own instead of generating it. You also have to select an output format for your report.

Now press the button “Finish” and the script editor is opened.

Step 2 - Write your first “Hello ARIS” report

Enter the following code lines in the script editor, save and close it. You will notice that the various parts of the code are highlighted to support editing.

var oOutput = Context.createOutputObject();
oOutput.OutputLn("Hello ARIS", "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
oOutput.WriteReport();

In the first line we create an output object. This object offers all methods we need to write our output document.

In the 2nd line we add “Hello ARIS” to this output object.

In 3rd line we generate the output document by calling the method “WriteReport”.

Now, you can run this report on an arbitrary model and you will get a document with the selected name and format in the selected directory:

Here you can download the entire source code from the "Hello ARIS" report.

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

by Ludo Beckers
Posted on Tue, 04/09/2013 - 11:33

Downloaded Hello_Aris.arx-file looks corrupted, because it's not human readable in my text editor.

1
by Midhat Un Nisa
Posted on Fri, 09/19/2014 - 11:52

Hi all,

I copied the script from here, pasted in a new script and ran in debugger. It ran fine, outputting "Hello ARIS". However, if I run ot over a model, it take me to debugging which continues forever. How do I make this simple script run?

Thanks!

 

1
by Ankit ranka
Posted on Fri, 09/19/2014 - 12:37

In reply to by Midhat Un Nisa

Hi Midhat,

can you please share the error screen shot so that I can understand the exact problem?

did you followed all the above mentioned steps properly?

 

Thanks,

Ankit

1
by Midhat Un Nisa
Posted on Fri, 09/19/2014 - 12:55

Hi Ankit,

Thanks for the response. There is no error. It just doesn't run on a model. Whenever I run the script (in Designer module), it takes me to "Scripts" module and there it continues to run forever till I press the Stop button. I've attached a screenshot for that. However, if I run the script myself in the Scripts module, it gives correct output.

File attachments
1
by Ankit ranka
Posted on Fri, 09/19/2014 - 13:36

In reply to by Midhat Un Nisa

Hi Midhat,

according to your snapshot I saw that when you are running your script from designer mode, in script tab your report is opened.

please close that report in script tab first then run it from designer mode it will work fine.

and also if your script is opened and you are trying to run from designer then first controls try to identify your report in script tab if found that it is opened then controls are redirecting to that report but at that point still execution of report is not started.

to start the execution you need to click play button again.

hope this helps :)

 

Thanks,

Ankit

 

 

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

Hello, Michael!

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
by Runé Becker
Badge for 'Mastermind' achievement
Posted on Fri, 02/15/2019 - 10:30

Dear Fedor,

Please don't post the same question at many different places. We should avoid redundancy.

Cheers

Rune

1
by Fedor Stroganov
Posted on Fri, 02/15/2019 - 11:45

In reply to by rbe

I see, thanks a lot for your attention! I just look at old answers in some themes and hope that my posts give me a chance.

Well, I guess (not sure) that my ARIS version are old and I haven't WYSIWYG editor :(

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