Event is used to extend the website functionality.
Business rule can be defined for each event.
Event code are actions that can be attached into the business rules.
IF THIS THEN THAT
Event rule action has the format of: If this then that.
If match condition, then execute the action, otherwise do something else.
Event Type
Eventtype are predefined with the system, when creating an event code, you need to define which event that code is target for.
Right now, we have defined the following event types.
RouteFinding
RouteFound
RouteNotFound
ViewFinding
ViewFound
ViewNotFound
PageFinding
PageNotFound
PageFound
Event Code
Below is sample event code with type of "RouteFinding". This even take one configuration value, if has value, redirect user to that url.
var url = k.config.name;
if (url) {
k.response.redirect(url);
}
The configuration code is
var config = [];
var item = {};
item.name = 'name';
item.controlType = "TextBox";
config.push(item);
k.export(config);
After that, you can attach the action to events.