Needed graph for given image followed by JSON

{
“nodeDataArray”: [
{
“key”: “start_node”,
“category”: “Start”,
“text”: “Start”
},
{
“key”: “end_node”,
“category”: “End”,
“text”: “End”
},
{
“key”: “create invoice from spreadsheet”,
“text”: “Create Invoice From Spreadsheet”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “create payment”,
“text”: “Create Payment”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “PYMT”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “on hold invoice”,
“text”: “On Hold Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “on hold”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “release invoice”,
“text”: “Release Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “generic”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “create accounting for invoice”,
“text”: “Create Accounting For Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “create payment through template”,
“text”: “Create Payment Through Template”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “PYMT”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “create debit memo from spreadsheet”,
“text”: “Create Debit Memo From Spreadsheet”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “DM”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “create invoice”,
“text”: “Create Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “create accounting for payment”,
“text”: “Create Accounting For Payment”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “PYMT”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “force approve invoice”,
“text”: “Force Approve Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “approve”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “approve invoice”,
“text”: “Approve Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “approve”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “reject invoice”,
“text”: “Reject Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “reject”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “request information for invoice”,
“text”: “Request Information For Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “generic”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
},
{
“key”: “create withholding invoice”,
“text”: “Create Withholding Invoice”,
“actionType”: “Activity”,
“highlight”: false,
“category”: “Mined”,
“categories”: [
“Mined”
],
“type”: “Mined”,
“nodeAbbreviation”: “INV”,
“operation”: “create”,
“nodePassingThroughCasesCount”: 1,
“nodePassingThroughScenarioCount”: 1,
“nodeErrors”: 0,
“application”: “OracleFusion”
}
],
“linkDataArray”: [
{
“from”: “start_node”,
“to”: “create payment through template”,
“text”: “191”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “start_node”,
“to”: “create invoice”,
“text”: “96”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “start_node”,
“to”: “create invoice from spreadsheet”,
“text”: “17”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “start_node”,
“to”: “create withholding invoice”,
“text”: “12”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “start_node”,
“to”: “create payment”,
“text”: “5”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “start_node”,
“to”: “create debit memo from spreadsheet”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “start_node”,
“to”: “on hold invoice”,
“text”: “1”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “approve invoice”,
“to”: “create accounting for invoice”,
“text”: “11”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “approve invoice”,
“to”: “create payment”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “approve invoice”,
“to”: “create payment through template”,
“text”: “7”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create accounting for invoice”,
“to”: “create accounting for payment”,
“text”: “1”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create accounting for invoice”,
“to”: “create payment”,
“text”: “3”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create accounting for invoice”,
“to”: “create payment through template”,
“text”: “19”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “approve invoice”,
“text”: “21”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “create accounting for invoice”,
“text”: “6”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “create payment”,
“text”: “3”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “create payment through template”,
“text”: “6”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “force approve invoice”,
“text”: “5”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “on hold invoice”,
“text”: “13”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “reject invoice”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “request information for invoice”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice from spreadsheet”,
“to”: “force approve invoice”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice from spreadsheet”,
“to”: “on hold invoice”,
“text”: “1”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create payment”,
“to”: “create accounting for invoice”,
“text”: “1”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create payment”,
“to”: “create accounting for payment”,
“text”: “1”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “force approve invoice”,
“to”: “create accounting for invoice”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “force approve invoice”,
“to”: “create payment through template”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “force approve invoice”,
“to”: “on hold invoice”,
“text”: “3”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “on hold invoice”,
“to”: “release invoice”,
“text”: “12”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “release invoice”,
“to”: “create accounting for invoice”,
“text”: “7”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “release invoice”,
“to”: “create payment through template”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create payment through template”,
“to”: “end_node”,
“text”: “227”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice”,
“to”: “end_node”,
“text”: “38”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create invoice from spreadsheet”,
“to”: “end_node”,
“text”: “14”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create withholding invoice”,
“to”: “end_node”,
“text”: “12”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create payment”,
“to”: “end_node”,
“text”: “11”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “on hold invoice”,
“to”: “end_node”,
“text”: “6”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create accounting for invoice”,
“to”: “end_node”,
“text”: “4”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “release invoice”,
“to”: “end_node”,
“text”: “3”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create accounting for payment”,
“to”: “end_node”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “request information for invoice”,
“to”: “end_node”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “reject invoice”,
“to”: “end_node”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “create debit memo from spreadsheet”,
“to”: “end_node”,
“text”: “2”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
},
{
“from”: “approve invoice”,
“to”: “end_node”,
“text”: “1”,
“type”: “Mined”,
“category”: “Mined”,
“categories”: [
“Mined”
]
}
]
}

I want to render same graph which, I have given above. I had try many approaches and layout but couldn’t get accurate results. My json is fully dynamic so we need to take care of node location and also link has to in order.

Did using LayeredDigraphLayout not provide what you want? How so?

This reminds me of this sample: Process Layout
The routing is different, and you seem to have additional “threads” of nodes, so I suspect that implementation will not work for you either.

Here’s what I get using your data and very simple templates:

The code:

<!DOCTYPE html>
<html>
<head>
  <title>Minimal GoJS Sample</title>
  <!-- Copyright 1998-2024 by Northwoods Software Corporation. -->
</head>
<body>
  <div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:600px"></div>

  <script src="go.js"></script>
  <script id="code">
const $ = go.GraphObject.make;

const myDiagram =
  new go.Diagram("myDiagramDiv",
    {
      layout: $(go.LayeredDigraphLayout, { direction: 90 })
    });

myDiagram.nodeTemplate =
  $(go.Node, "Auto",
    $(go.Shape,
      { fill: "white" },
      new go.Binding("fill", "color")),
    $(go.TextBlock,
      { margin: 8 },
      new go.Binding("text"))
  );

myDiagram.linkTemplate =
  $(go.Link,
    { curve: go.Link.Bezier },
    $(go.Shape),
    $(go.Shape, { toArrow: "OpenTriangle", segmentIndex: -Infinity })
  );

myDiagram.model = new go.GraphLinksModel( . . . );
  </script>
</body>
</html>
1 Like

But the problem here is start and end node should be in straight path.

Is that the only additional alignment requirement? You could customize the layout by overriding LayeredDigraphLayout.commitLayout to call the super method and then move those Start and End Nodes to be where you want them to be.

Hey walter,
i have changed my json and add popularity in the categories, it means i want the node which have incoming and outgoing link greater then 10 links then it should be coming in straight line and rest of node will be coming just right and left of node location does not matter but based on popularity number node will be assigned in middle straight line. I want this behavior through LayeredDiagraphLayout, Also is their any code samples to override properties of LayeredDigraphLayout.commitLayout.

I don’t think there’s an easy way to get that behavior, but it’s something we can look into.

What if there’s no “popular” node in a layer?

then node place at any location of diagram, majorly we have to focused of popular nodes should be placed in straight line as my above image is showing.

Hi Walter, do you have any suggestion related to chart

Not yet – it’s a non-trivial problem that will take some time to investigate. And I cannot promise a satisfactory solution either. But I’ll try.

This is very crucial for us to implement that chart give us solution at least near to that diagram

The following code uses your model data augmented by a primary property on the node data, indicating that it’s supposed to be arranged in a column. The result is:

<!DOCTYPE html>
<html>
<head>
  <title>Layout of "primary" nodes in a column</title>
  <!-- Copyright 1998-2024 by Northwoods Software Corporation. -->
</head>
<body>
  <div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:600px"></div>

  <script src="https://unpkg.com/gojs"></script>
  <script id="code">
// Arrange primary nodes in a vertical column, assuming at most one node per layer
// has data.primary set to true.
// This only works for direction === 90 or 270, and ignores arrangementOrigin
class PrimaryLayeredDigraphLayout extends go.LayeredDigraphLayout {
  commitNodes() {
    super.commitNodes();
    const prims = [];
    const layers = [];
    this.network.vertexes.each(v => {
      if (!v.node) return;
      if (v.node.data.primary) prims.push(v);
      const list = layers[v.layer] || [];
      list.push(v);
      layers[v.layer] = list;
    });
    let maxw = -Infinity;
    prims.forEach(v => {
      if (!v.node) return;
      maxw = Math.max(maxw, v.width);
    });
    layers.forEach(lay => {
      lay.sort((a, b) => a.x - b.x);
      // find primary node in this layer
      let i = lay.findIndex(v => v.node && v.node.data.primary);
      if (i > -1) {
        const n = lay[i].node;
        // center it at zero
        n.moveTo(0 - n.actualBounds.width/2, n.position.y);
        // now move nodes on its left at decreasing positions, preserving order
        let x = -maxw/2 - this.columnSpacing * 2;  // extra space around primary nodes
        for (let j = i-1; j >= 0; j--) {
          const m = lay[j].node;
          x -= m.actualBounds.width;
          m.moveTo(x, m.position.y);
          x -= this.columnSpacing;
        }
        // now move nodes on its right at increasing positions, preserving order
        x = maxw/2 + this.columnSpacing * 2;  // extra space around primary nodes
        for (let j = i+1; j < lay.length; j++) {
          const m = lay[j].node;
          m.moveTo(x, m.position.y);
          x += m.actualBounds.width + this.columnSpacing;
        }
      } else {  // if no primary node in this layer
        let totw = 0;  // find total space needed
        lay.forEach(v => totw += v.node.actualBounds.width);
        totw += (lay.length-1) * this.columnSpacing;
        // just arrange them centered about zero
        let x = -totw/2;
        lay.forEach(v => {
          v.node.moveTo(x, v.node.position.y);
          x += v.node.actualBounds.width + this.columnSpacing;
        });
      }
    });
  }
}

const $ = go.GraphObject.make;

const myDiagram =
  new go.Diagram("myDiagramDiv",
    {
      layout:
        $(PrimaryLayeredDigraphLayout,
          {
            direction: 90, isRouting: false,  // always
            layerSpacing: 60,  // increase as maximum number of incoming or outgoing links increases
            setsPortSpots: false,  // when using ...Side Spots
            layeringOption: go.LayeredDigraphLayout.LayerLongestPathSource  // optional
          })
    });

myDiagram.nodeTemplate =
  $(go.Node, "Auto",
    { fromSpot: go.Spot.TopBottomSides, toSpot: go.Spot.TopBottomSides },
    $(go.Shape,
      { fill: "whitesmoke", spot1: go.Spot.TopLeft, spot2: go.Spot.BottomRight },
      new go.Binding("fill", "primary", p => p ? "deepskyblue" : "whitesmoke"),
      new go.Binding("figure", "primary", p => p ? "Capsule" : "Rectangle")),
    $(go.TextBlock,
      { margin: 8 },
      new go.Binding("text"))
  );

myDiagram.linkTemplate =
  $(go.Link,
    { routing: go.Link.AvoidsNodes, corner: 25 },
    $(go.Shape),
    $(go.Shape, { toArrow: "OpenTriangle", segmentIndex: -Infinity })  // at midpoint
  );

myDiagram.model = new go.GraphLinksModel(
  [
    { "primary": true,
      "key": "start_node",
      "category": "Start",
      "text": "Start"
    },
    { "primary": true,
      "key": "end_node",
      "category": "End",
      "text": "End"
    },
    {
      "key": "create invoice from spreadsheet",
      "text": "Create Invoice From Spreadsheet",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create payment",
      "text": "Create Payment",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "PYMT",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "on hold invoice",
      "text": "On Hold Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "on hold",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "release invoice",
      "text": "Release Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "generic",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create accounting for invoice",
      "text": "Create Accounting For Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "create payment through template",
      "text": "Create Payment Through Template",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "PYMT",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "create debit memo from spreadsheet",
      "text": "Create Debit Memo From Spreadsheet",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "DM",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create invoice",
      "text": "Create Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create accounting for payment",
      "text": "Create Accounting For Payment",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "PYMT",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "force approve invoice",
      "text": "Force Approve Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "approve",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "approve invoice",
      "text": "Approve Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "approve",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "reject invoice",
      "text": "Reject Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "reject",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "request information for invoice",
      "text": "Request Information For Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "generic",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "create withholding invoice",
      "text": "Create Withholding Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    }
  ],
  [
    {
      "from": "start_node",
      "to": "create payment through template",
      "text": "191",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create invoice",
      "text": "96",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create invoice from spreadsheet",
      "text": "17",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create withholding invoice",
      "text": "12",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create payment",
      "text": "5",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create debit memo from spreadsheet",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "on hold invoice",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "create accounting for invoice",
      "text": "11",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "create payment",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "create payment through template",
      "text": "7",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "create accounting for payment",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "create payment",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "create payment through template",
      "text": "19",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "approve invoice",
      "text": "21",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "create accounting for invoice",
      "text": "6",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "create payment",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "create payment through template",
      "text": "6",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "force approve invoice",
      "text": "5",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "on hold invoice",
      "text": "13",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "reject invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "request information for invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice from spreadsheet",
      "to": "force approve invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice from spreadsheet",
      "to": "on hold invoice",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment",
      "to": "create accounting for invoice",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment",
      "to": "create accounting for payment",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "force approve invoice",
      "to": "create accounting for invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "force approve invoice",
      "to": "create payment through template",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "force approve invoice",
      "to": "on hold invoice",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "on hold invoice",
      "to": "release invoice",
      "text": "12",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "release invoice",
      "to": "create accounting for invoice",
      "text": "7",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "release invoice",
      "to": "create payment through template",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment through template",
      "to": "end_node",
      "text": "227",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "end_node",
      "text": "38",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice from spreadsheet",
      "to": "end_node",
      "text": "14",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create withholding invoice",
      "to": "end_node",
      "text": "12",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment",
      "to": "end_node",
      "text": "11",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "on hold invoice",
      "to": "end_node",
      "text": "6",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "end_node",
      "text": "4",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "release invoice",
      "to": "end_node",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for payment",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "request information for invoice",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "reject invoice",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create debit memo from spreadsheet",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "end_node",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    }
  ]
);
  </script>
</body>
</html>

Hi walter, thankyou for your reply
image
i have nodeDataArray, linkDataArray, and topNodesArray. Now i want to keep these nodes in a straight path and remaining node should be coming through left and right port by auto LayeredDigraphLayout. I want link should be like page flow Page Flow and remaining what you gave above

Now you please give solution of this approach

OK, just change the node template so that by default the links connect at the left or right sides, and change the layout so that links that connect “primary” nodes have Link.fromSpot as go.Spot.Bottom and Link.toSpot as go.Spot.Top.

<!DOCTYPE html>
<html>
<head>
  <title>Layout of "primary" nodes in a column</title>
  <!-- Copyright 1998-2024 by Northwoods Software Corporation. -->
</head>
<body>
  <div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:600px"></div>

  <script src="https://unpkg.com/gojs"></script>
  <script id="code">
// Arrange primary nodes in a vertical column, assuming at most one node per layer
// has data.primary set to true.
// This only works for direction === 90 or 270, and ignores arrangementOrigin
class PrimaryLayeredDigraphLayout extends go.LayeredDigraphLayout {
  _primarySpacing = 50;
  get primarySpacing() { return this._primarySpacing; }
  set primarySpacing(val) {
    if (val != this._primarySpacing) {
      this._primarySpacing = val;
      this.invalidateLayout();
    }
  }

  commitNodes() {
    super.commitNodes();
    const prims = [];
    const layers = [];
    this.network.vertexes.each(v => {
      if (!v.node) return;
      if (v.node.data.primary) prims.push(v);
      const list = layers[v.layer] || [];
      list.push(v);
      layers[v.layer] = list;
    });
    let maxw = -Infinity;
    prims.forEach(v => {
      if (!v.node) return;
      maxw = Math.max(maxw, v.width);
    });
    layers.forEach(lay => {
      lay.sort((a, b) => a.x - b.x);
      // find primary node in this layer
      let i = lay.findIndex(v => v.node && v.node.data.primary);
      if (i > -1) {
        const n = lay[i].node;
        // center it at zero
        n.moveTo(0 - n.actualBounds.width/2, n.position.y);
        // now move nodes on its left at decreasing positions, preserving order
        let x = -maxw/2 - this.primarySpacing;  // extra space around primary nodes
        for (let j = i-1; j >= 0; j--) {
          const m = lay[j].node;
          x -= m.actualBounds.width;
          m.moveTo(x, m.position.y);
          x -= this.columnSpacing;
        }
        // now move nodes on its right at increasing positions, preserving order
        x = maxw/2 + this.primarySpacing;  // extra space around primary nodes
        for (let j = i+1; j < lay.length; j++) {
          const m = lay[j].node;
          m.moveTo(x, m.position.y);
          x += m.actualBounds.width + this.columnSpacing;
        }
      } else {  // if no primary node in this layer
        let totw = 0;  // find total space needed
        lay.forEach(v => totw += v.node.actualBounds.width);
        totw += (lay.length-1) * this.columnSpacing;
        // just arrange them centered about zero
        let x = -totw/2;
        lay.forEach(v => {
          v.node.moveTo(x, v.node.position.y);
          x += v.node.actualBounds.width + this.columnSpacing;
        });
      }
    });
    // make sure links connecting two "primary" nodes connect vertically, not on the sides
    this.network.edges.each(e => {
      if (!e.link) return;
      if (!e.link.fromNode || !e.link.fromNode.data.primary) return;
      if (!e.link.toNode || !e.link.toNode.data.primary) return;
      e.link.fromSpot = go.Spot.Bottom;
      e.link.toSpot = go.Spot.Top;
    });
  }
}

const $ = go.GraphObject.make;

const myDiagram =
  new go.Diagram("myDiagramDiv",
    {
      layout:
        $(PrimaryLayeredDigraphLayout,
          {
            direction: 90, isRouting: false,  // always
            primarySpacing: 60,  // increase as maximum number of incoming or outgoing links increases
            setsPortSpots: false,  // when using ...Side Spots
            layeringOption: go.LayeredDigraphLayout.LayerLongestPathSource  // optional
          })
    });

myDiagram.nodeTemplate =
  $(go.Node, "Auto",
    { fromSpot: go.Spot.LeftRightSides, toSpot: go.Spot.LeftRightSides },
    $(go.Shape,
      { fill: "whitesmoke", spot1: go.Spot.TopLeft, spot2: go.Spot.BottomRight },
      new go.Binding("fill", "primary", p => p ? "deepskyblue" : "whitesmoke"),
      new go.Binding("figure", "primary", p => p ? "Capsule" : "Rectangle")),
    $(go.TextBlock,
      { margin: 8 },
      new go.Binding("text"))
  );

myDiagram.linkTemplate =
  $(go.Link,
    { routing: go.Link.AvoidsNodes, corner: 25 },
    $(go.Shape),
    $(go.Shape, { toArrow: "OpenTriangle", segmentIndex: -Infinity })  // at midpoint
  );

myDiagram.model = new go.GraphLinksModel(
  [
    { "primary": true,
      "key": "start_node",
      "category": "Start",
      "text": "Start"
    },
    { "primary": true,
      "key": "end_node",
      "category": "End",
      "text": "End"
    },
    {
      "key": "create invoice from spreadsheet",
      "text": "Create Invoice From Spreadsheet",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create payment",
      "text": "Create Payment",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "PYMT",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "on hold invoice",
      "text": "On Hold Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "on hold",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "release invoice",
      "text": "Release Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "generic",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create accounting for invoice",
      "text": "Create Accounting For Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "create payment through template",
      "text": "Create Payment Through Template",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "PYMT",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "create debit memo from spreadsheet",
      "text": "Create Debit Memo From Spreadsheet",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "DM",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create invoice",
      "text": "Create Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "create accounting for payment",
      "text": "Create Accounting For Payment",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "PYMT",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    { "primary": true,
      "key": "force approve invoice",
      "text": "Force Approve Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "approve",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "approve invoice",
      "text": "Approve Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "approve",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "reject invoice",
      "text": "Reject Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "reject",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "request information for invoice",
      "text": "Request Information For Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "generic",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    },
    {
      "key": "create withholding invoice",
      "text": "Create Withholding Invoice",
      "actionType": "Activity",
      "highlight": false,
      "category": "Mined",
      "categories": [
        "Mined"
      ],
      "type": "Mined",
      "nodeAbbreviation": "INV",
      "operation": "create",
      "nodePassingThroughCasesCount": 1,
      "nodePassingThroughScenarioCount": 1,
      "nodeErrors": 0,
      "application": "OracleFusion"
    }
  ],
  [
    {
      "from": "start_node",
      "to": "create payment through template",
      "text": "191",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create invoice",
      "text": "96",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create invoice from spreadsheet",
      "text": "17",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create withholding invoice",
      "text": "12",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create payment",
      "text": "5",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "create debit memo from spreadsheet",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "start_node",
      "to": "on hold invoice",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "create accounting for invoice",
      "text": "11",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "create payment",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "create payment through template",
      "text": "7",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "create accounting for payment",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "create payment",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "create payment through template",
      "text": "19",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "approve invoice",
      "text": "21",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "create accounting for invoice",
      "text": "6",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "create payment",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "create payment through template",
      "text": "6",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "force approve invoice",
      "text": "5",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "on hold invoice",
      "text": "13",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "reject invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "request information for invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice from spreadsheet",
      "to": "force approve invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice from spreadsheet",
      "to": "on hold invoice",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment",
      "to": "create accounting for invoice",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment",
      "to": "create accounting for payment",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "force approve invoice",
      "to": "create accounting for invoice",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "force approve invoice",
      "to": "create payment through template",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "force approve invoice",
      "to": "on hold invoice",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "on hold invoice",
      "to": "release invoice",
      "text": "12",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "release invoice",
      "to": "create accounting for invoice",
      "text": "7",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "release invoice",
      "to": "create payment through template",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment through template",
      "to": "end_node",
      "text": "227",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice",
      "to": "end_node",
      "text": "38",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create invoice from spreadsheet",
      "to": "end_node",
      "text": "14",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create withholding invoice",
      "to": "end_node",
      "text": "12",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create payment",
      "to": "end_node",
      "text": "11",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "on hold invoice",
      "to": "end_node",
      "text": "6",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for invoice",
      "to": "end_node",
      "text": "4",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "release invoice",
      "to": "end_node",
      "text": "3",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create accounting for payment",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "request information for invoice",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "reject invoice",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "create debit memo from spreadsheet",
      "to": "end_node",
      "text": "2",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    },
    {
      "from": "approve invoice",
      "to": "end_node",
      "text": "1",
      "type": "Mined",
      "category": "Mined",
      "categories": [
        "Mined"
      ]
    }
  ]
);
  </script>
</body>
</html>

Hi Walter, Can we get more space and curve in the diagram like you see in diagram links are overlapping and also doesn’t able to understand (from to) of the node. also look the end node have different incoming link. so i want the links to the end should visible as one link before going to merge end node mentioned with red color.

Read Extending Dynamic Ports Link Routing Overlapping Issue
This functionality (but not that particular code) will be supported in v3.0.

Set Node | GoJS API to go.Node.SpreadingNone.