RF

Hi All ,

Can anyone please let me know, How to syn or copy a group ,subgroup and model  from one group to another group within the database difference  via script? I have tried But still I was unable to do.  What is the syntax?

what has reference links about it?

please help ,

Thanks in advance.

 

 

by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Wed, 06/29/2016 - 13:29

Hi,

you have to open a database object for the other database. And then you can either use a merge object to merge objects/models/groups from the source to the target database. Or you can create new groups and name them as the group in the source.

Just copying a group from one database to another is never possible - always via merge.

 

oTargetDB = ArisData.openDatabase(sTargetDBName, sUser, sPassword, g_oSourceDB.ActiveFilter().GUID(), g_nLoc[0])

 

    oMerge = Context.getComponent("Merge");

    var arMergeList = new Array();

    arMergeList.push(oMasterModel);

    var oGroupScriptInfo = oMerge.createGroupScriptInfo([null], false);

    var tResult = oMerge.createVariant(arMergeList, oVariantModel.Group(), aoObjDefMapping, oGroupScriptInfo);

    if (tResult.isSuccessful()){

        

        // get the newly created variant model

        var tResultMapping = tResult.getMapping();

        for (i = 0; i < tResultMapping.length; i++){

            if (tResultMapping[i].getTargetObject().KindNum() == 10005){

                oNewVariantModel = tResultMapping[i].getTargetObject();

                break;

            }

        }

        if (oNewVariantModel != null && oNewVariantModel.IsValid()){

            asOutput[1] = "Ein neues Variantenmodell wurde angelegt:") + oNewVariantModel.Name(g_nLoc[0]);

}

 

 

BR Robert

 

0
by Rachmat Fajar Author
Posted on Thu, 06/30/2016 - 06:18

Hi Robert



How about the script ?

if there are three databases ,that is db x , db y ,and db z,

and in db x, db y, and db z there is group named NANO , in NANO in db x,how syn or copy group 1, group 2, group 3 from db x to db y and db z for every day ?

 I have tried But still I was unable to do.

i am newbie

please help

best regards

fajar

0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Wed, 07/13/2016 - 08:41

Hi Fajar,

ahm well, perhaps you should post your code and we can have a look at it...   But if you are a newbie to ARIS scripting, this is not a good example with which to learn. This is very complex :-)

BR Robert

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • CR
  • BH
  • Profile picture for user Ivan.Ivanov.softwareag.com
  • Profile picture for user mscheid
  • MS
  • 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