Here's an excellent and comprehensive tutorial on how to add advanced event handling in your scenarios. It helps to fill the void created by the cpmplete lack of official documentation of this feature.
The author is by Rudolf Heijink (RudolfJan).
The guide includes several links to additional material.
The guide is a pdf file inside a zip file inside another zip file, which opens easily using 7zip but sometimes will throw an error when trying to open it using the Windows built-in zip handler.
Download from the RWA file library