ID

Hi guys:

I am trying to copy (merge) a package from a Database to another by using an script. I cannot find a method for doing that. Does anyone know which method is needed?

Manually it goes like this:

 

Thank you very much,

Ignacio

by Kay Fischbach
Posted on Tue, 09/17/2019 - 11:43

You're probably looking for something like this:


var nLocale = Context.getSelectedLanguage();

var selGroups = ArisData.getSelectedGroups();

var targetDB = ArisData.openDatabase(there are multiple ways to open a database, I recommend you look into the ARIS Script help to pick one);

var mergeComponent = Context.getComponent("Merge");
var mergeOptions = mergeComponent.createMergeOptions(ArisData.getActiveDatabase());

mergeComponent.startMerge(selGroups, targetDB, mergeOptions);

Note that you'll have to adapt the openDatabase method to make it work in your enviroment.

I highly recommend you take a look at the Report Components ARIS has to offer, if you haven't already. There is some interesting functionality hidden in some of those components. You can read more about them in the ARIS script help "ARIS Script" > "Methods for reports and semantic checks" > "Global objects" > "Report component interfaces" > all the sub pages.

In case you're also developing macros, macros have those components too. But you don't have to load them, instead you just directly use Class name [dot] method name (e.g. "Merge.createMergeOptions()").

0
by Ignacio De Diego Author
Posted on Tue, 09/17/2019 - 13:06

In reply to by Kay Fischbach

Hi Kay, thanks for your answer, it really helped me, but for some reason it does not work executing the script from a UML2 Package:

The getLogfileContent() method of startMerge() does not show anything and is not successful. Do you have any idea why? thanks! Ignacio

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • CP
  • BZ
  • Profile picture for user TEF_Bernd
  • ПЦ
  • CR
  • PacMan

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