Hi there!

Im working on script for BPMN model creation (transformation), the idea behind is to create new (e)BPMN collaboraation diagram via report script. I can create pool and lane inside with standard methods:

// targetGroup defined in dialog window
targetModel = targetGroup.CreateModel(Constants.MT_ENTERPRISE_BPMN_COLLABORATION, "Model Name", locale);
// access BPMN 2 support component
    var bpmnComponent = Context.getComponent("Designer");
    bpmnSupport = bpmnComponent.getBPMNSupport(targetModel);

// create the pool and the system lane
    var pool = targetGroup.CreateObjDef(Constants.OT_BPMN_POOL,"Test Process", locale);
    var defaultPool = bpmnSupport.createBpmnObject(pool, null, Constants.ST_BPMN_POOL_1);

    var lane = targetGroup.CreateObjDef(Constants.OT_BPMN_LANE,"Application System Lane 1"), locale);
    var defaultLane = bpmnSupport.createBpmnObject(lane, null, Constants.ST_BPMN_LANE_1);

    bpmnSupport.setBpmnParent(defaultLane, defaultPool);  // set parent for Lane 

This part is OK. Now Im struggling with specific task - to create Lane in Lane and here appears a question if it is possible to create Lane in Lane via script?

In Aris Architect you can create it manually very easy - just click on big "+" inside a Lane in which you want to create, let´s say "nested" lane, define number of lanes, symbol, position and that´s all:

My idea is to create a Role lane in Application system type lane

When I try an approach from code above, similar code but instead of pool I use Lane and try to set parent of Lane to other Lane:

   var ObjDefForLane = systemObjDef
   var ObjDefForLaneChild = targetGroup.CreateObjDef(Constants.OT_BPMN_LANE, "Automatic", locale);

   var laneOcc = createLane(typeNum, symbolNum, ObjDefForLane)  // lane from Object definition created in pool - adjusted method similar to bpmnSupport.createBpmnObject(arisObject, defaultPool, symbolNum)
   var laneOccChild = bpmnSupport.createBpmnObject(ObjDefForLaneChild, null, Constants.ST_BPMN_LANE_1);    //( ObjDef  objDef, ObjOcc  parent, int  symbolNum ) 
bpmnSupport.setBpmnParent(laneOccChild, laneOcc);

I get an error on  last "setBpmnParent" method"Error: JavaException: java.lang.IllegalArgumentException: lanes can only have pools as parent"

Does somebody know, if it is possible to create such think as in my example "Automatic" Role lane in "Application System Lane"? Thank you a lot in advance..


Featured achievement

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
  • Profile picture for user Henrik Buckler
  • Profile picture for user UffeK
  • SS
  • MZ
  • Profile picture for user kbiront
  • PacMan


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