PH

Hi all,

I need to create copies of reports to create new revised versions of them.

Does anybody out there know how to create a copy of an Aris report script without losing any information?

So far, I've tried two different ways to copy reports:

1) Export report and import it again under a new name.

Problem:

Due to the identifier, Aris recognises the report and overwrites the original one.

2) Create new report and copy script code into the new report.

Disadvantages:

- String table isn't copied

- Properties have to be copied manually field by field

- In case the original report was created in the wysiwyg-editor, the copy can only be edited in the script editor.



--> Possible workaround for the string table: To avoid losing the string table, I copied the original string table to excel and created a variable declaration for each string (e.g. var HEADERTEXT1 = "xyz"). Subsequently, I copied this table back into the script to define each string as a global variable.

I confess it's not pretty but, it works...



Does anybody have better solution how to create a copy of a report? Or is there a better way to handled versioning of reports?

Many thanks in advance!

by Stefan Geis
Posted on Fri, 04/16/2010 - 08:54

Phillip,

do you know where the identifier is stored in the exported data?

My guess is that it is just the file names (without filename extension) in the exported amx / zip  file (to open the exported data, add the filename extension ".zip"). If I am correct, a solution is to extract all the files, change the names from e.g. cfc7a6e0-fc0f-11dd-67f4-aec0902754fe.info to something else, but the same something for all of the files (i.e. .script, .info, .loc), re-zip it, remove the extension .zip and import the data.

But this is a hack because the filename seems to be a GUID. If you change it to something similar, it is more likely that your new filename still satisfies the GUID properties (especially to be unique on your machine) but you never know... 

In case you try this, let me know whether this worked & good luck!

Stefan

0
by Philipp Hess Author
Posted on Fri, 04/16/2010 - 09:59

In reply to by bstowman

Hi Stefan

Thanks a lot for you answer. That's an excellent idea! And I can say it right away: It works perfeclty.

To make sure that I don't accidentially take a used identifier, I created a new empty report and took its GUID. According to your advice, I renamed the files in the .arx file and re-imported it. The copy of the report then overwrote the emtpy report which was exactly how it was intended.

 

Remark about compression of the zip file: 

Firstly, I got an error during the import because Aris doesn't seem to be able to handle "enhanded deflate" compression. But using normal compression, it worked flawlessly.

Thank you very much for your help & best regards,

Philipp

 

0
by Martin Schröder
Badge for 'Contributor' achievement
Posted on Tue, 04/20/2010 - 18:15

Congratulations, Philipp!

I enjoyed the script training with IDS some weeks ago and your findings were presented there as "best practice" to preserve the string tables.

To wrap up the hack: If you dare to fumble with the files directly you do not need to go via the exported archive.
The directories under

%ARISHOME71%\LocalServer\templates\scriptservice\Report\

represent the report script categories shown in Business Architect > Administration > Evaluation(?) > Report.

In order to create a distinct version of your script, copy all source and their properties files 

{original_GUID}.* 

to a temp. directory, rename them into

{your_new_GUID}.*

and move them back to a directory/category of your choice under

...\scriptservice\Report\

 I suppose it works similary for macros under 

...\scriptservice\ClientScript\
 

After sharing many of the exercise scripts in class the "Save As...(with new GUID)" function climbed high on my wishlist for the ABA Script Editor.

Regards, Martin

 

0
by Volker Eckardt
Posted on Tue, 06/01/2010 - 10:36

In reply to by Nikolay Eshich

Hi,

I followed this thread with great interest. If you create a tutorial as I have done you need exactly such a functionality.

In between I have created my own script to assist me. Initially it was just a plain JavaScript, but then I decided to move it into ARIS as macro, utilizing what I already had.

You can download it right from here.

When you start it, you will be asked to

  1. go to the directory where you are looking for a report or macro to copy (can be disabled)
  2. then define some parameters  for the copy.
  3. and then run it.

As result you get a new report (arx) or macro (amx) file to import immediately back into ARIS - this acts also a bit as a validation.  (I tried also a direct copy into the mentioned directories above, but ARIS is not recognizing such a backdoor addition, so I changed my approach)

There are for sure a lot of possible improvements (see open issues in the script file), but from my perspective it works quite sufficient.

To be able to start it quickly I have added it also to the symbol list (menu Evaluate > configure macros...).

You may also use it just for backup purposes (with the timestamp option).

Please let me know how it works in your environment.

Cheers,

    Volker

0
by Stefan Geis
Posted on Fri, 04/16/2010 - 19:50

 Yeah, that's a gimme five! :D

Your idea to reuse the GUID from a dummy script makes this a perfect concept / hack.

... and makes an exceptional good starter into the weekend,

have a nice one!

Stefan

P.S. Is there a way (script) to automatically create a script? 

0
by Philipp Hess Author
Posted on Tue, 04/20/2010 - 16:40

:-)

So far, I've never had the need to create scripts out of scripting.... But there's no report object listed in the Aris script reference. So, I don't think that it's possible create a report out of a report.

But I thought there would be a function in Javascript which allows to interpret a string as source code... Ah yes, the function is called eval() - I haven't tried whether is available in Aris. But applied recursively, one could theoretically create a new report out of an existing one depending on certain criteria. But however, I'm not sure that this is what you had in mind - it might be rather something to tinker around with :-)

Have a good evening,

Philipp

0
by Philipp Hess Author
Posted on Tue, 06/01/2010 - 08:54

Hi Volker

your macro's really fantastic! It makes the copying of reports much easier... also, getting the the *.info-file directly from the source folder is a very good idea!

How big do you consider the risk of accidentally creating the same GUID a second time? Having the length of the GUID in mind, it's statistically insignificant I guess . Have you ever encountered any problems?

Thank you very much for sharing your script :-)

Cheers, Philipp

0
by Volker Eckardt
Posted on Tue, 06/01/2010 - 10:28

In reply to by Frank Weyand

Hi Philipp,

Thanks a lot for your kind replay, nice to see that you find it useful. The way how I am constructing the GUID is just a workaround because I was not able to find a better way. Additionally I had trouble calling ARIS internal classes (this works quite good in reports but errors out in macros) – therefore I decided to stop further investments.  Probably someone else could tell me how I can get the next free GUID in my installation in a macro?

But apart from that, the risk to get one which is already in use is really so low….

Volker

0
by Jonas Ekstrom
Posted on Fri, 09/27/2013 - 09:11

Hi,

is this script still valid and downloadable?

Jonas

0

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