Page flow port location

use the diagram of page flow but node location not working properly as a linear line.
save node in one straight line and any node add to this node should be coming as auto layout. It means

start → node1 → node2 → node3 —> node4 → end and childs of nodes should be coming as auto layout as discussed in page flow sample.

If I understand you correctly, you started from Page Flow.

Normally when a Node or a Link is added to or removed from a Diagram, its Layout is invalidated and then the layout is performed at the end of the transaction. Do you want that, or did you disable that by setting Layout.isOngoing to false, as that sample does?