      );

  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.toolManager.linkingTool.temporaryLink.routing = go.Routing.Orthogonal;

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