Profile picture for user nivas4310

Hi Team,

I am trying to generate the models using report instead of going to each and every object and selecting the option "Generate Model" by right clicking on it manually. I am half way through it. And I got stuck and doesn't know how to proceed. Can someone please let me know where I am doing wrong? Below is the function which I am using for generating model.

function generateModelfortheObject(objectName)
{
  var group = objectName.Group();
  var modelNew = Context.getComponent("ModelGeneration");
  if(objectName.Name(g_nloc) == "XYZ")
  {
    modelNew.generateModelByObjDefs(objectName, objectName.Name(g_nloc), 21, group);
  }
}

Thanks in advance.

Best Regards,

Srinivas.

by Ariene Kroeze
Posted on Fri, 05/02/2014 - 13:05

    var lSelectedObjDefs = ArisData.getSelectedObjDefs()           

    var modelNew = Context.getComponent("ModelGeneration");

    var options = modelNew.createModelGenerationOptions()

    var group = lSelectedObjDefs[0].Group();

    modelNew.generateModelByObjDefs(lSelectedObjDefs, "Hallo", 21, group, options);

 

hope this helps, kind regards,

Ariene Kroeze

0
by Srinivas CH Author
Posted on Fri, 05/02/2014 - 13:25

In reply to by Ariene Kroeze

Hi Ariene Kroeze,

Thanks for your help! 

However it is not working, I tried before also with options but in vain.

    for(var i = 0; i < groups.length; i++) { // iterate through all groups
        var j = 0;
        var k = 0;
        var objectsApp = groups[i].ObjDefListFilter(6);
      
        for(k = 0; k < objectsApp.length; k++){ // iterate through all models in the group
            generateModelfortheObject(objectsApp[k]);
        }
        
        var childGroups = groups[i].Childs(true);
        for(j = 0; j < childGroups.length; j++){ //iterate through all sub groups
            var m = 0;
            var childobjectsApp = childGroups[j].ObjDefListFilter(6);
            for(m = 0; m < childobjectsApp.length; m++){ // iterate through all models in the group
                generateModelfortheObject(childobjectsApp[m]);    
            }              
        }          
      }

function generateModelfortheObject(objectName)
{
  var group = objectName.Group();
  var modelNew = Context.getComponent("ModelGeneration");
  var options = modelNew.createModelGenerationOptions();
  if(objectName.Name(g_nloc) == "XYZ")
  {
    modelNew.generateModelByObjDefs(objectName, objectName.Name(g_nloc), 21, group,options);
  }
}

BR/Srinivas.

0
by Matias Kokko
Posted on Mon, 05/05/2014 - 08:02

Hi,

generateModelByObjDefs seems to require an array of objectDefs. Did you try with:

modelNew.generateModelByObjDefs([objectName], objectName.Name(g_nloc), 21, group,options);

br,

-Matias

0
by Srinivas CH Author
Posted on Mon, 05/05/2014 - 08:45

In reply to by makokko

Hi Matias,

Thank you so much.. Its working :)

Best Regards,

Srinivas.

0
by Srinivas CH Author
Posted on Fri, 05/09/2014 - 11:32

In reply to by makokko

Hi Matias,

Now I can able to generate the model using report, However I cannot able to see the connections with the other objects, I know that can be possible with ModelGenerationOptions. Can you please let me know how the syntax will be to show the connections in the generated model? Many thanks in advance.

Best Regards,

Srinivas.

0
by na xi
Posted on Fri, 09/05/2014 - 10:23

In reply to by nivas4310

Hi Srinivas CH , you can set the new model's template like this, I tyied and it works.

var _subModel = modelNew.generateModelByObjDefs(ObjDefs, newModelName, Constants.MT_EEPC, group,options); _subModel.setTemplate("2ed57d10-68c8-11d7-5d85-000bcd25c95f");

_subModel.ApplyTemplate();

0
by Guillermo Lopez
Posted on Tue, 09/19/2017 - 16:50

Srinivas....are you there?

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