AP

How to get the users having read/write access of a particular model (using script)?

by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Tue, 02/09/2016 - 13:08

Hi,

well, concerning the ARIS help, this should be quite easy:

Model.Group().AcessRights()

var accessMap = ArisData.getSelectedGroups()[0].AccessRights()
 var it = accessMap.entrySet().iterator()
 while(it.hasNext())
 {
   var entry = it.next()
   outfile.OutputLn(entry.getKey() + " : " + entry.getValue(), "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_BOLD | Constants.FMT_LEFT, 0)
 }

 

BR Robert

0
by Abriti Porel Author
Posted on Tue, 02/09/2016 - 14:07

In reply to by rgoldenbaum

Thanx Robert

0
by Abriti Porel Author
Posted on Wed, 02/10/2016 - 05:55

Hi Robert,

this code is not working.. I am using ARIS 7.1  What should I do?

0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Wed, 02/10/2016 - 08:08

Well, what about posting your code, or start debugging the script and see where the problem is...

Or check if the commands I listed are already available in 7.1. Btw I think I mistyped "Model.Group().AcessRights()" - this should be AccessRights()...

BR Robert

0
by Abriti Porel Author
Posted on Wed, 02/10/2016 - 11:42

var nLocale = Context.getSelectedLanguage();

var Model = ArisData.getSelectedModels();

var oGroup = ArisData.getSelectedGroups();



Model.oGroup.AccessRights()

var accessMap = ArisData.getSelectedGroups()[0].AccessRights()

var it = accessMap.entrySet().iterator()

while(it.hasNext())

{

var entry = it.next()

outfile.OutputLn(entry.getKey() + " : " + entry.getValue(), "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_BOLD | Constants.FMT_LEFT, 0)

}

 

0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Wed, 02/10/2016 - 12:53

Argh, not really ?!?    Perhaps you should try to read some other examples for scripting here...

1) If this is the complete script, you have not created an output object - so even if it runs, you won't get any results

2) var oModel = ArisData.getSelectedModels() is an array of models

3) the same for the group

4) Model.oGroup.AccessRights() does not do anything as there is not = or something like it in it. And if you want to get the group of a model, you have to call the method with (). 

So this line should be:

var accessMap = Model[0].Group().AccessRights()

But you do realize that this forum is not for people learning how to script or to get trainings for free...

Robert

0
by Abriti Porel Author
Posted on Wed, 02/10/2016 - 14:13

yeah.. ofcourse Robert, We are new in ARIS platform and we have written very few scripts till now, don't have much experience. That's why I was asking for help.

We are not trying to get "trainings for free"..

The above one is not the complete code, we are searching and trying in different ways. It was throwing different different errors, to remove that we did the editing line by line. It was the wrong way we were trying initially.

And later we also found the code you posted is available in ARIS 7.1 only as example of the AccessRights() method.

Anyway.. Thanks for your attention.

 

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