                  { width: 6, height: 6, portId: "Out", fromSpot: go.Spot.Right })
              )
          )
      );

  diagram.linkTemplate =
    new go.Link({ routing: go.Routing.Orthogonal, corner: 3 })
      .add(
        new go.Shape(),
        new go.Shape({ toArrow: "Standard" })
      );

  diagram.layout = new go.LayeredDigraphLayout({ columnSpacing: 10 });

  diagram.model =
    new go.GraphLinksModel(
      { linkFromPortIdProperty: "fromPort",  // required information:
        linkToPortIdPro