Added saving workflow to mongo