Serialize Buildgraph

When build is finished and graph is generated. Serialize the graph so that it can be viewed even if part of the runs in the flow are removed. I do not know if this is of general interest as there are other ways to work around this.