4. Overwrite all buttons in BPM8 to modify its click() function to browser call safeExit() function(defined for Close button of web browser only) when user submit data to server and the page will be reload or refresh.

After the button submit to data server, we need to se performShutdown variable = false.

NOTE1: in BPM8 using Heritage coach, the scripts in number 3 and 4 are defined in CoachDesigner.xsl file

NOTE2: We will have some difficulties when running debug, because when we enable our web browser in debug mode, the browser will reload the page which triggering the function onUnload() and will direct our process go to next task. Hence, we need to enable browser debug mode before that.