I recently came across a situation where I needed to be able to log a user-visible message to the screen from a business rule.
Fortunately, this is possible:
var msg=’What you are trying to do is not allowed’;
gs.addErrorMessage(‘<script>var t=setTimeout(function(){var test = confirm(“‘ + msg + ‘”);if(!test){return false;}},500);</script>’ + msg);
Hat tip to Anurag Tripathi over on the community forums for the solution: