JB

Hi, I am trying to create EPC models using Macros.

Hoping to get some help on the following areas in bold font.

try{

var myDBs = Context.getSelectedDatabases()

var mainGroup = Explorer.getMainGroup(myDBs[0]);

var group1=Explorer.createGroup ( mainGroup, "Group1" )

var model1= Explorer.createModel ( group1, "Model1", 13 )

var objDef1 = Explorer.createObjDef ( group1, "Activity1", 22, 335 )

Designer.createAssignmentExistingModelPersistent ( objDef1, model1)

// the Activity is created and assigned but is not renedered in the Model.

// Question: How do I create the object (Activity1) in the model?

 

var objDef2 = Explorer.createObjDef ( group1, "Subsystem", 270, 817)  //object, symbol

 

// Exception throws:  reference Error: "ObjDef1" is not defined

// Question: Why is this being thrown?  objDef1 is defined.  Is it that Activity1 is not created in the model?

Designer.createCxnDefPersistent ( objDef2, ObjDef1, 49 ) // 49 "is input for"

}

catch( e)

{

var a=e

}

Thanks!

by JC B Author
Posted on Wed, 04/20/2011 - 03:05

Resolved:

try{

    var myDBs = Context.getSelectedDatabases()

    var mainGroup = Explorer.getMainGroup(myDBs[0]);

   

    var group1=Explorer.createGroup ( mainGroup, "TestCase" )

   

    var model1= Explorer.createModel ( group1, "Model1", 13 )

    var objDef1 = Explorer.createObjDef ( group1, "Activity1", 22, 335 )

   

    Designer.openModel(model1, false,false,false)

   

    var objOccur = Designer.createObjOcc ( model1, objDef1, 335, new java.awt.Point(0,0) )

    Designer.save(model1)

}

catch( e)

{

    var a=e

    var e=a

}

 

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