How to make lane move between pool in the BPMN

Sorry, my English is not good.

Based on sample-[project/bpmn]

  1. How to make a Vertical-Pool group in this diagram

  2. How to make lane move between pools or put a lane into the pool

I found that lane will leave the pool if I moved the lane to the head of the pool,but I can’t take the lane into the pool.

Changing the BPMN sample to use vertical lanes will be a lot of work. I think the BPMN project code started from the Swim Lanes sample, whereas you want to start from the Swim Lanes (vertical) sample. If you don’t actually need BPMN graphical notation, it might be easiest to start over from the “Vertical” Swim Lanes sample and add what you do need.

If you add the code to the “Pool” Group template to handle a drop of a lane Group, then the user can drag-and-drop lanes between pools. Note that this requires them to drop onto the “Pool” header – the lane Group mouseDrop event handler disallows dropping any groups into a lane Group.

        $(go.Group, "Auto", groupStyle(),
          { // use a simple layout that ignores links to stack the "lane" Groups next to each other
            layout: $(PoolLayout, { spacing: new go.Size(0, 0) }),  // no space between lanes
            computesBoundsAfterDrag: true,  // needed to prevent recomputing Group.placeholder bounds too soon
            handlesDragDropForMembers: true,  // don't need to define handlers on member Nodes and Links
            mouseDrop: function(e, grp) {  // dropping a copy of some Nodes and Links onto this Group adds them to this Group
              // don't allow drag-and-dropping a mix of regular Nodes and Groups
              if (e.diagram.selection.all(function(n) { return n instanceof go.Group && n.category !== "Pool"; })) {
                var ok = grp.addMembers(grp.diagram.selection, true);
                if (ok) {
                } else {
              } else {

Thank you.
The sample ‘BPMN’ is really too complex for me.
At first,I used the ‘Swim Lanes’ as a template,but I failed in add a vertical-pool group too.
I will restart with ’ Swim Lanes’

I just need a diagram:

  • Draw some horizontal and vertical pool

  • Pools can be moved like ‘BPMN’

  • Put lane into the pool or take out.

  • Put node into the lane or take out.

“horizontal and vertical pool”? Sorry, but the sample code only supports one orientation at a time.

“Put lane into the pool or take out” you can accomplish with the additional “Pool” Group event handler that I gave above.

The rest of the functionality is already provided by the samples.

Can I add the “Swim Lanes Vertical” sample’s groupTemplate to gouptemplateMap to support it?
I tried, but the effect was not ideal.
In “Swim Lanes” sample, if I add a new node in some lane use “diagram.model.addNodeData” without “relayoutLanes”,the node will be “disappear”

The Diagram.groupTemplate, which is the default template for groups, is exactly the same template as the one named “” (the empty string) in the Diagram.groupTemplateMap.

If a Node does not have a real location (i.e. if Node.location doesn’t have a real value for Point.x and Point.y), how can the diagram know where to draw the node? That’s why if you do not set or bind the node’s location to a real point, a layout has to happen in order to assign a location to the node.