SG

Hi All

I am new to ARIS reports, one of our reports called Risk and Control matrix which extracts the risk and control object connected into an EPC or activity. When I run the report it gives me the following error " cannot find method ObjDef of undefined". What could be the issue?  The script is run at a model level  used to work fine before I am using 7.2. See the script below.

 

/ Entry Point

function main()

{

    var oL2Objects = ArisData.getSelectedObjOccs();

    var sGroupLevelName = '';

    //var sAssignedModels = oL2Objects[0].ObjDef.GetAssignments(g_mtBusArch);

    var sAssignedModels = oL2Objects[0].ObjDef().AssignedModels(g_mtBusArch);

    var bGovernanceLevelPassed = false;

    var oHighLevelValues;

    var oSuperiorObjDefs;

    var oModel;

    var oValueChainName = "[Value Chain Name]";

 

Thank you

   

by Tricarico Romain
Posted on Wed, 09/28/2016 - 16:33

Hello,

You created a script to run on a object occurrence, not on a model, select an object occurrence and the function will work.

The line : ArisData.getSelectedObjOccs(); return an array containing all occurrences selected. If you select a model, the array will be empty and the element number [0] of your array will be undefined.

Best Regards

0
by Sinalo Gubangca Author
Posted on Thu, 09/29/2016 - 15:48

In reply to by BPMap

Thanx Tricarico

Even when I select the the object occurrence, it gives me the same error. The report should provides a Business Processes Activities risks, and associated controls and these are in are connected in an activity which is a object definition and the risk and controls are object occurrences. See the error below

Kind Regards

0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Thu, 09/29/2016 - 16:28

Well, what he meant is that if the start context of the report is model, and in the script you are using the start object occurrences, then you would get an error as you have described earlier...

What is the start context of the script and what is the complete code ?

BR Robert

0
by Sinalo Gubangca Author
Posted on Wed, 11/23/2016 - 11:48

In reply to by rgoldenbaum

image

Thank you to both of you for the responses, the report start at a function or by selecting an object. I tried changing the fist line to var oL2Objects = ArisData.getSelectedObjDef(); now it complains that it cannot find the function and I make sure that I select object that has assignments.  The script is very long I have attached it. I hope this make sense.

Thank you

Sinalo

File attachments
0
by Gerald Schroeder
Posted on Wed, 11/23/2016 - 14:19

Hello Sinalo,

a quick guess - the function name according to ARIS Script Help:

Report class ArisData - Method getSelectedObjDefs

getSelectedObjDefs ( )

Returns all selected object definitions if the report is started on one or more object definitions, object occurrences or object definition shortcuts.

So maybe you just missed an 's'?

BR Gerald

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