Prompt dialog on click workflow state

You’re catching the refresh event, which gets called after save. Try catching before_workflow_action.

Edit: here’s a proper explanation: