Jump to: navigation, search

event

DevGuide2.png Purpose: Defines the mandatory 'events' element.

Description

Defines a business event. This element must have a unique ID across the DSL file, include triggers related to HTML source code, and specify the information to submit in the business event to the Frontend Server. In the Frontend Server, the business event is identified by its 'name' label, which can be shared among several business events. For instance, if you define several event elements associated with the Search HTML elements of the website, you can assign the name 'Search' to all of them. The event name can also be used to create further rules with the Genesys Rules Authoring Tool.

Parent Element

Child Elements

Attributes

Name Mandatory Type Description
id yes string

Internal identifier for the event. This is must be unique across the DSL file, to make a distinction between the events sent by the browser.

name yes string

Name sent to the Frontend Server. A DSL file may contain several <event> elements with identical values for 'name', but with different values for 'id'. For example, if your website includes a Search form, you can submit this form by clicking on the 'search' button or by pressing the 'enter' key. Inside the browser, the click and key press events are clearly distinct, but is not relevant for the Frontend Server.

condition no JavaScript Boolean expression

If the condition returns true, the event triggers will be installed in the page. See Example below.

Example

The following example shows how to create two business events which return the same business event name to the Frontend Server:

<?xmlversion="1.0"encoding="utf-8"?>
<propertiesdebug="false">
  <events>
     <eventid="SearchEvent"name="Search">
     ...
    </event>
    <eventid="SearchKeyDownEvent"name="Search">
      ...
    </event>
  </events>
</properties>

The following example creates a business event with a timer which can be triggered only if the level-1 heading of the page is titled "Compare".

<?xml version="1.0"encoding="utf-8"?>
<properties debug="false">
  <events>
     <event id="InactivityTimeout4CompareProductsEvent" 
            name="InactivityTimeout4CompareProducts"
            condition="$('h1').text() == 'Compare'">
      <trigger name="InactivityTimeout4CompareProductsTrigger" 
               element="" action="timer:10000" type="timeout" 
               url="http://www.MySite.com/site/olspage.jsp" count="1"/>
      ...
    </event> 
  </events>
</properties>
This page was last edited on July 17, 2020, at 16:13.
Comments or questions about this documentation? Contact us for support!