Using DefaultObjectFormProcessor we have defined an action when user clicks menu/command. Based on status of EPMDocument we need to add hook/catch before the action method gets executed. Provide Javascript prompt (Yes/No). I need to invoke JAVASCRIPT action in preProcess() method. Based on Yes/No input the next Process method gets called or abort.
It is not very clear what exactly you want to acheive. If you could elaborate your problem statement liitle bit more, it will be easier to help you out.
I just need to create UI menu action by clicking on it shall perform certain validation on CAD Document and based on that it shall prompt yes/no dialog to user. Based on the user input yes/no final action shall be committed.