Incorrect positioning of links

Links going from IF( Diamond ) to Yes or No is properly aligned But links going from Open Browser to EndIf (Diamond) is
not properly aligned.Please see below example.

Diagram.layout : go.LayeredDigraphLayout
Group.layout : go.LayeredDigraphLayout

Noda Data Array

[
	{
		"key": 10000000001,
		"category": "Start",
		"text": "Start",
		"item": "start"
	},
	{
		"key": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"category": "subprocess",
		"text": "If/EndIf Block",
		"item": "generic task",
		"taskType": 0,
		"isGroup": true,
		"isSubProcess": true,
		"loc": "182.609343625 159.348916015625",
		"ActionType": "ControlFlowConstruct"
	},
	{
		"key": "IfParentDiamond22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"category": "If",
		"text": "If",
		"item": "start",
		"taskType": 0,
		"group": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"gatewayType": 4,
		"eventType": 1,
		"eventDimension": 1,
	},
	{
		"key": "YesNode22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"group": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"category": "Yes",
		"text": "Yes",
		"item": "start",
		"taskType": 0,
		"gatewayType": 4,
	},
	{
		"key": "854839f3-950d-4fb3-a2cc-6b0abe999d48",
		"category": "activity",
		"ArtifactText": "OpenBrowser",
		"text": "OpenBrowser             ",
		"item": "generic task",
		"taskType": 0,
		"group": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",

	},
	{
		"key": 1007,
		"category": "Else",
		"text": "No",
		"item": "start",
		"taskType": 0,
		"gatewayType": 4,
		"eventType": 1,
		"eventDimension": 1,
		"group": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
	},
	{
		"key": "13eb4700-ea0c-49e2-8768-dc9079baf9ca",
		"category": "activity",
		"ArtifactText": "OpenBrowser",
		"text": "OpenBrowser             ",
		"item": "generic task",
		"taskType": 0,
		"group": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",

	},
	{
		"key": "EndIfNode5e504f40c-191c-429b-8b68-fd55e9960c0c",
		"group": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"category": "EndIf",
		"text": "EndIf",
	},
	{
		"key": 10000000009,
		"category": "End",
		"text": "End",
		"item": "start"
	}
]

Link Data Array

[
	{
		"from": 10000000001,
		"to": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0"
	},
	{
		"from": "IfParentDiamond22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"to": "YesNode22dd1b88-4219-4a27-83ce-f77ae4f3e3b0"
	},
	{
		"from": "YesNode22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"to": "854839f3-950d-4fb3-a2cc-6b0abe999d48"
	},
	{
		"from": "IfParentDiamond22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"to": 1007,
		"fromPort": "T",
		"toPort": "B"
	},
	{
		"from": 1007,
		"to": "13eb4700-ea0c-49e2-8768-dc9079baf9ca"
	},
	{
		"from": "854839f3-950d-4fb3-a2cc-6b0abe999d48",
		"to": "EndIfNode5e504f40c-191c-429b-8b68-fd55e9960c0c",
		"fromPort": "R",
		"toPort": "T"
	},
	{
		"from": "13eb4700-ea0c-49e2-8768-dc9079baf9ca",
		"to": "EndIfNode5e504f40c-191c-429b-8b68-fd55e9960c0c",
		"fromPort": "R",
		"toPort": "B"
	},
	{
		"from": "IfParent22dd1b88-4219-4a27-83ce-f77ae4f3e3b0",
		"to": 10000000009
	}
]

That looks like it meets the expectations of LayeredDigraphLayout. How is the Group.layout configured?

layout: $(go.TreeLayout)

Ah, TreeLayout works well on tree-structured graphs, but yours is not tree-structured, is it?

If you really want to use TreeLayout, if if you can guarantee that there is only one node in the last layer, you may need to customize TreeLayout in order to reposition the node to be centered. ParallelLayout does this: Parallel Layout.

Otherwise you’ll need to use LayeredDigraphLayout.

tried using ParallelLayout But throw me this error

Uncaught Error: LayoutNetwork.findVertex:node value is not an instance of Node: undefined

I have used same init() function you have given in example a

Did you adapt either the ParallelLayout code or your model to support the requirements of ParallelLayout. It requires identifying the one Split and one Merge node in each group, which appear to be labeled “If” and “EndIf” in your screenshot.