ID

Hi guys,

I am trying to find by script an UML2 Class by using: 

db.Find(Constants.SEARCH_OBJDEF, null, Constants.AT_NAME, nLocale, OpMalGrN, Constants.SEARCH_CMP_WILDCARDS)

But I am not getting any response, even if there are 2 uml2 classes with the exact name.

 

What am I doing wrong?

Thanks,

Ignacio

by Torsten Haase
Posted on Fri, 10/23/2020 - 17:22

Hi Ignacio,

many UML2 elements are "groups" in Aris, because in UML they "contain" other elements. So the search has to me performed for groups. The second issue is the second parameter (null). When searching for a UML2 class, please specify the type as second parameter: Constants.OT_UML2_CLASS.

The following short script shows it all together:
 

var db = ArisData.getActiveDatabase()
var nLocale = Context.getSelectedLanguage()

var oFound = db.Find(Constants.SEARCH_GROUP, Constants.OT_UML2_CLASS, Constants.AT_NAME, nLocale, "MyClass*", Constants.SEARCH_CMP_WILDCARDS)
var size = oFound.length
Dialogs.MsgBox("number of classes found: "+size)

BR, Torsten

0
by Ignacio De Diego Author
Posted on Mon, 12/21/2020 - 12:01

Thanks mate, I will try as soon as I can. Ignacio

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