Profile picture for user m3b

Hi all

I'm just beginning writing some scritpt reports and I have a couple of questions.

First, how do you version script sources? I did not see any built-in versioning capabilities for scripts. I was thinking of using github for versioning the scripts and copy/paste between github and aris script editor. The downside is script tables (which contains text constants definitions) : is it possible to export/import the content of the script tables to version them with git ?

My second question is about testing object occurrence equality. For example, given the object occurrences of a model, I get the relationships of the object and I want to test if a given object occurrence is the target or source of the relationship.

So far I'm using this test :

  if (relations_list[i].TargetObjOcc().ObjDef().ObjectID()== anObjOcc.ObjDef().ObjectID())

which seems pretty complicated (but it  does the trick)

because the test (relations_list[i].TargetObjOcc() == anObjOcc ) does not seem to work (I'm learning javascript at the same time)

But is there a more simple test ? 

Thanks for your answsers,






by Kay Fischbach
Posted on Wed, 04/24/2019 - 08:28

I don't have any experience with versioning reports, can't help you there.

Regarding your second question:

Your approach doesn't work in 100 % of all imaginable test cases.

Plug two occurrences with the same object definition into the same model, and let a report check whether or not they are the same occurrence with your approach. Your report would tell you they are the same, even though they are not the same (they only share the same object definition, but can be placed in different parts of your model graph).

You can either scratch the .ObjDef() from your way of doing it (occurrences have an ObjectID() method too), or use the more convenient wrapper method .IsEqual(...) which you can find for many object types (occurrences, object definitions, databases,...). .IsEqual(...) compares objects using their ObjectIDs too, but it's easier to use.

  if (relations_list[i].TargetObjOcc().IsEqual(anObjOcc))

.IsEqual(...) simply returns the boolean true if the ObjectIDs match, or false if they don't match.


by Michel Bénard Author
Posted on Thu, 04/25/2019 - 07:09

In reply to by Kay Fischbach

Thanks Key

If I understand well :

relations_list[i].TargetObjOcc().IsEqual(anObjOcc) is True when TargetObjOcc and anObjOcc are the same occurrences


relations_list[i].TargetObjOcc().ObjDef().IsEqual(anObjOcc.Def()) is True when TargetObjOcc and anObjOcc relate to the same Object definition (but are possibly different occurrences , maybe in the same model)


by Kay Fischbach
Posted on Thu, 04/25/2019 - 09:03

In reply to by m3b

That's correct.


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