Hi Sathya,
After a microflow finishes, an instruction set is send back to the client (browser). This set includes instructions like “show pop-up”, “close page”, “refresh these objects”, “navigate to page”. The exact timing of the progress bar being hidden and these instructions cannot be influenced using a microflow. All instructions are being executed first, before the progress bar is hidden.
As alternative, you could use a nanoflow in between (so: triggered by the button and calling your original microflow). The advantage is that you can show and hide the progress bar using a JavaScriptAction from the Nanoflow commons module, and then you have more control over the timing of hiding the progress bar and showing a message, etc. Think of something like shown below, to which you can add a “Show message” at the end for example.
Don't forget to add error handling like shown below, otherwise your users are stuck with a progress bar which will never disappear.
Hopefully this helps!
Good luck