1) Triggering a boundary event when window is closed.
- In order to achieve this first you need to create a coach view which fires a boundary event.
Within this coach view add below in line java script code
var _this = this
window.onbeforeunload = function(){
this.context.trigger()
}
above piece of code will fire a boundary event on window close.
2) Fire a boundary event , when user navigates from the page.
- If user is navigating from the page using out of the box bpm control (i.e button), boundary event will get fired by default.
- If user is navigating from the page using custom control (i.e link), this.context.trigger() will required to be fired (i.e on click of link)