Profile picture for user freddy

Good day,

Is it possible to import an .arx script file into ARIS using the scripting language?

by Eva Klein
Badge for 'Community Team' achievement
Posted on Thu, 08/25/2011 - 08:29

Hi Freddy,

yes you can import .arx files into ARIS. For this check out the following article "Reports and macros in ARIS".

Regards

Eva

 

0
by Freddy Barkhuizen Author
Posted on Thu, 08/25/2011 - 09:36

Hi Eva,

That article is about importing .arx files using ARIS. I want to know if you can do it programmatically using another javascript report?

0
by Amol Patil
Posted on Thu, 08/25/2011 - 11:31

Hi Freddy,

Keep both the javscript reports in same group. For eg. Report 1 and Report 2

Consider we have to import code from Report 2 in Report 1.

1) Keep Report 2 in same folder group as of Report 1, or keep Report 2 in common files.

2) Go to Properties of Report 1. Select "General" tab. There you will find "Imported Files" button. You can select files to be imported into Report 1. Report 2 will also be listed there.

 

If you want to execute Report 2 in some point of time in Report 1 execution, check Report component for Report.execute method.

Thanks,

Amol Patil

 

0
by Freddy Barkhuizen Author
Posted on Thu, 08/25/2011 - 13:02

Hi Amol,

This will still not allow me to import .arx files programmatically.

 

I have a ZIP file that contains around 50 arx file, in my ARIS Script I already have the code that extracts the ZIP file, now I want to know if their is away to import the arx files with code in a ARIS Script?

 

0
by Amol Patil
Posted on Thu, 08/25/2011 - 16:46

Hi Freddy,

 

I misunderstood you problem. Now I guess you need to unzip the zip file containing .arx, and import them in some folder in ARIS, through script. Please try the following if it helps.

1. Create a blank Folder in ARIS script module. e.g. "Import".

2. You have a code to unzip arx file. This is gr8. You need to further unzip .arx file also. There will be minimum 3 files for each .arx file (.info, .script, .loc)

3. Use some java code to copy all the unzipped arx (.info, .script, .loc) files to the folder "Import" located at "{ARIS Install}\server\templates\scriptservice\Report\Import".

4. Might require aris server restart.

Thanks,

Amol Patil

0
by Deleted User
Posted on Sun, 08/28/2011 - 01:05

What you are trying to is something like the C/C++ "#include" statement, correct?

Hypothetical syntax:

include("myfunctions.arx");

// use included library functions here

myfunA(..);

myfunB(..);

 

Maybe we could emulate #include's behaviour using a combination of java file reader + javascript eval(..).

 

0
by Freddy Barkhuizen Author
Posted on Wed, 09/14/2011 - 11:27

Hi All,

I finally found a way to do the importing of an .arx file using javascript.

Here is my code:

var oScript = new com.idsscheer.aris.server.bl.logic.scriptadmin.AScriptAdmin("");
var oVASN = new com.idsscheer.aris.cltech.common.core.ariscommon.VASNInfo(0,0);

oScript.deleteCategory(1,1,"", new Array("Fred Test"),false,oVASN);
oScript.createCategory(1,"", new Array("Fred Test"),oVASN);

var oFile = Dialogs.getFilePath("", "*.arx!!ARIS Script Files|*.arx||", "", "Select ARX File to Import", 1);
    
if(oFile!=null){
    oFile = oFile[0];
    
    var bytes = oFile.getData();
    Dialogs.MsgBox(oScript.importScript(1,1, "", "Fred Test", 1, bytes, true, oVASN));
}

This script deletes the "Fred Test" category and then creates it again. It then show me a open dialog where I can select the .arx file I want to import. 

The script imports the .arx file into the "Fred Test" category.

There is only one problem, for some reason it creates a weird artifact in the "Fred Test" category called "__COMPONENT_1".

Do you maybe know why it is doing that, and how I can fix it?

0
by Deleted User
Posted on Wed, 09/14/2011 - 13:45

Hi Fred,

That's an interesting hack you have over there, using internal classes for script handling :-)

I believe the artifact "__COMPONENT_1" is part of the ARX file (which is a ZIP file itself):

 

 

(If someone requests, I can post more information on this subject - ARX file formats)

Maybe some arguments to oScript.ImportScript are incorrect? I haven't checked the parameter semantics, but I guess one of them controls what artifact we pull from the ARX file (component, source code, locale info, script info,...)

Just a wild guess.

I've tried running your code on 7.0.2 (old version, I know), without luck. I have access to other versions as well, so what's the ARIS version you are using? 7.2?

Cheers!

0
by Freddy Barkhuizen Author
Posted on Thu, 09/15/2011 - 13:43

Hi Kyle,

Thanks for the reply, it really helped a lot. Got it working.

I'm using ARIS 7.1 R 06 .

0
by Francois Du Toit
Posted on Tue, 12/06/2011 - 09:07

Hi Freddy,

Thank you for the interesting script. Why would you want to import external ARX files into ARIS, I would just like to understand the background a little better.

Could you also please provide your last version where you got it working just to finalise the thread?

Thank you in advance.

Rgs,

Francois du Toit

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