flatten workflow