is model needs to know about particular ports
    myDiagram.model = new go.GraphLinksModel({
      copiesArrays: true,
      copiesArrayObjects: true,
      linkFromPortIdProperty: 'fid',
      linkToPortIdProperty: 'tid'
    });

    // Make sure the pipes are ordered by their key in the palette inventory
    function keyCompare(a, b) {
      const at = a.data.key;
      const bt = b.data.key;
      if (at < bt) return -1;
      if (at > bt) return 1;
      return 0;
    }

    myPalette = new go.Palette('