Hi Everyone,

Busy working on a script in ARIS 10.0.4

It runs from a Function symbol on a VACD.

When I debugged and tested, no problem were found. However, in ARIS Connect I got an error.

Same object on the same model was used to test.

The code looks like this:

selObjModel = selObjOccs[0].Model();

ARIS Connect Error:

Cannot call method "Model" of undefined....

Does the .Model() method not work in Connect, or have they changed the statement?

Thanks for your help.


by Kay Fischbach
Posted on Tue, 02/12/2019 - 15:41

In ARIS 10.0.3 we have a problem with the ArisData.getSelectedObjOccs() method. Maybe they didn't fix it with 10.0.4 yet? (I'm not even sure if they fixed it with the current up-to-date release)

Anyways, in Connect (for ARIS 10.0.3) when we select an occurrence in the model and run a report for it, we can only retrieve the object definition of the selected occurrence (with ArisData.getSelectedObjDefs()). That's quite stupid when the object definition has multiple occurrences and we don't know from which one the report was started.

Maybe you could check if your Connect behaves similar? I'd suggest a script like this (Context can be similar to your original script - allow functions. The output format I'd recommend is txt, but you can pick anything except xls and pdf (the OutputTxt method is not supported with those) and xls/xlsx (we didn't go through the hustle to create an excel sheet and whatnot)).

var oOutput = Context.createOutputObject(); //create an output object

var selObjOccs = ArisData.getSelectedObjOccs(); //get selected object occurrences

var selObjDefs = ArisData.getSelectedObjDefs(); //get selected object defs

for each(var selObjOcc in selObjOccs){ //iterate through the array of selected objec occurrences - each iteration one element of the array becomes selObjOcc
    oOutput.OutputTxt("Found Occ"); //tell us that there is an occurrene

for each(var selObjDef in selObjDefs){ //iterate through the array of selected objec defs - each iteration one element of the array becomes selObjDef
    oOutput.OutputTxt("Found Def"); //tell us that there is a def

oOutput.WriteReport(); //write the report to file


Feel free to extend the script to check the other ArisData.getSelected... methods.



Featured achievement

You blog more than you breathe, and your articles stand out: Create 20 more articles, receive very good feedback and stimulate conversations
Recent Unlocks


Weekly | All-time
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