BPMN message flow link

By default these two message flow links are drawn this way:

My question is, how to get this two links to be parallel to each other instead they crossing each other at some point?

I guess you have modified the node template for Tasks from what’s in the BPMN sample? How are the fromSpot and toSpot defined? Do you have that problem if both links go in the same direction?

I just tried it and got this result:

After moving one node not to be directly above/below each other:

If you really want to control it, I suppose you could use custom Link routing, such as what is done in this sample: http://gojs.net/latest/samples/network.html

Nope I didn’t modified anything. Picture I sent is from original BPMN example when activities are in different pools and then connected. I can’t make two msg links in the same direction anyway so I can’t tell you what is happening when both links are in the same directions. Did you tried this in BPMN example or made own example? Because I’m asking what needs to be done in BPMN example to get the same behavior like in your pictures from reply post? Meanwhile I will look into example you are referring to me.

My test, shown in my previous reply, did not involve the BPMN sample at all.

Interactively in extensions/BPMN.html I cannot draw links the way that you show in your screenshot. All links from Tasks come out from the right side, and all links to Tasks go into the left side. Your links are connecting with the bottom and the top sides. And they are dashed too.

Yes but did you put tasks in different pools? Only if tasks are in different pools and you connect them then you will have message flow link (link.category = "msg’ and it is dotted and has circle on start and arrow at the end) instead of sequence flow link which is full line with arrow at the end that you describing. So you have to put tasks in different pools not different swim lines or the same swim lanes to get links I got in my picture.

Ah, l learn something new every day.

It turns out there already is a custom Link class, PoolLink. Try modifying the extensions/BPMNClasses.js file:

PoolLink.prototype.computeOtherPoint = function(othernode, otherport) {
  var op = go.Link.prototype.computeOtherPoint(this, othernode, otherport);
  var node = this.toNode;
  if (node === othernode) node = this.fromNode;
  if (othernode.category === "privateProcess") {
    op.x = node.getDocumentPoint(go.Spot.MiddleBottom).x;
  } else {
    if ((node === this.fromNode) ^ (node.actualBounds.centerY < othernode.actualBounds.centerY)) {
      op.x -= 1;
    } else {
      op.x += 1;
  return op;

That seems to help for this case. But I haven’t really tested this to see if it doesn’t hurt in any other cases.

Well so far all examples I checked are fine with this code. I let you know if I find something but so far this is a solution.Thanks for help.