Hi Ashwin,
"Flow Became Invalid" this issue comes only when there is gap in communication.
Please refer the below KBA
1853268 - flowThread() Flow became invalid during waiting for request (BODI-300137) - Data Services
https://service.sap.com/sap/support/notes/1853268
Thanks,
Daya