Hi Yi,
Like Andrej says, that's not the way Mendix works; as the microflow is run on the server and returns a set of instructions back to the client (browser) after it is finished.
I think you should be able to split the logic in two flows: one doing the preparation of your logic and showing the dialog and one finalizing the logic having the last input.
Hopefully you can continue this way!
Kind regards,
Johan