Online documentation - Websydian v6.5 |
Introduction Implementing Parts
First, you must create a local EventDetection entity in your application model that inherits from the RepeatedEventDetection pattern in the WSYSESS library. As the RepeatedEventDetection pattern makes use of the Session Control pattern it is also necessary to replace the abstract Websydian Session Control pattern with the session control pattern implemented in the application.
MyEventDetection | is a ENT | RepeatedEventDetection |
Replaces ENT ...by ENT |
SessionControl MySessionControl |
The local MyEventDetection entity will now scope the pattern to implement Repeated Event Detection for the application.
Please refer to Implementing the SessionControl Pattern for details on how to implement the Session Control pattern.
As the DetectedEvents entity used to store detected events only inherits from STORAGE/DataAccess, you need to declare the DetectedEvents entity as a STORAGE/RelationalTable before the entity can be generated and built.
MyEventDetection.Data.DetectedEvents | is a ENT | STORAGE/RelationalTable |
In order to declare a specific EventHandler function as a protected event, i.e. it is only allowed to be activated one time for each page instance, you must inherit from the abstract EventHandler function scoped under the Abstract entity. Each PageGenerator function that scopes a protected EventHandler function must inherit from the abstract PageGenerator function located the same place.
Example:
Order.ConfirmPage | is a FNC | MyEventDetection.Abstract.PageGenerator |
Order.ConfirmPage.Order | is a FNC | MyEventDetection.Abstract.EventHandler |
No further actions are needed to declare an EventHandler function for protected. All that is left is to generate and build the changed/created functions and built a new document template for the PageGenerator function.
When using protected events it is important to ensure that the user can continue with the application without being forced to use the back button when the user is presented for the error page. E.g. by using a frame menu or inserting a Continue button on the error page.
A special error page is called when a repeated event is detected. This error page has to be generated and built, and a template has to be created by running the _DocumentTemplateGenerator.
Generate and build:
MyEventDetection.Services.RepeatedEventErrorPage
MyEventDetection.Services.RepeatedEventErrorPage._DocumentTemplateGenerator
Run the function MyEventDetection.Services.RepeatedEventErrorPage._DocumentTemplateGenerator