To execute a process after a dialog (or pop-in/popup) is closed, add a <Done> exit to the Close Window action and flow from there through exits placed on all model layers (i.e. the button, footer, etc.) up to the point where you exit the dialog at which point you can place your process.
This is demonstrated in the attached sample project Buttons and Dialogs.zip (note that it also addresses this question).
Note that if you try placing a <Done> exit on the dialog itself, you'll find that it is fired immediately after the dialog being opened - this is due to the asynchronous nature of dialogs (processes in the background continue to execute), which is why you must use the explicit flow definition demonstrated.
For best results, use the Firefox browser..