The answers to your questions are “no”, you don’t have to have saved node locations in your database, and “yes”, you can use GoJS Layouts to automatically position nodes and route links. http://gojs.net/latest/intro/layouts.html
I guess you are starting with the FlowChart sample, http://gojs.net/latest/samples/flowChart.html, which uses saved node locations and no Diagram.layout.
Perhaps you have not seen the Flowgrammer sample, http://gojs.net/latest/samples/flowgrammer.html? That uses LayeredDigraphLayout as the Diagram.layout. However that layout does not have the two links coming out from a conditional/“if” node from the left and right sides. We should improve that sample.
But you can get some of the same effects by setting the Diagram.layout of the FlowChart sample:
layout: $(go.LayeredDigraphLayout,
{ direction: 90, setsPortSpots: false, isOngoing: false }),
You can add an HTML Button or other command that calls Diagram.layoutDiagram() when the user wants to perform a layout after adding or removing any nodes or links.
If you do not want users to move nodes, set Diagram.allowMove to false. See http://gojs.net/latest/intro/permissions.html for more information, including other permissions that you might want to disable for your users.