|
Genesys 8.1 SCXML Technical Reference |
||
< Object Model Parameter Elements > |
This defines the set of ECMAScript functions that can be used on the object model for this functional module interface. These functions can be used from ECMAScript expressions and within the <script>
element or any other SCXML executable content section. The criteria for using a function versus an action element are:
The action must be immediate (that is, it cannot block).
The action does not generate any events.
The action does not affect the state of an object.
The action does not return a property of a defined ECMAScript object. This information should be accessed through the properties of the given object.
Genesys strongly discourages the exposure of functionality or actions via ECMAScript functions. Action elements are preferred over functions because they allow our schema to define what actions are valid, what parameters they must pass, and so on. Therefore action elements are less error-prone and more in line with the SCXML specification.
Functions can be used for the following types of actions:
Actions that transform or format data or properties (for example, time_DateInZone).
Actions that set or change a functional module or interface's behavior with respect to the given session (for example, _genesys.queue.CheckAgentState) and the action elements that are used during this session.
All functions will be function properties of the appropriate functional module object. For example, _genesys.queue.reserveTargets().
The following is the list of restrictions with respect to functional module functions:
The following is the naming convention that we will use for all ECMAScript functions which can be used within the session:
For example, _genesys.session.ActiveServerName()
The following is a summary of all the functional module root objects that will be supported by Genesys functional modules:
Functional module |
Function root |
Functions implemented |
---|---|---|
queue |
_genesys.queue |
|
interaction |
_genesys.ixn |
Interaction Functions, Voice Interaction Functions, Msgbased Interaction Functions, Chat Interaction Functions |
dialog |
_genesys.dialog |
|
resource |
_genesys.resource |
|
statistic |
_genesys.statistic |
|
classification |
_genesys.classification |
|
session |
_genesys.session |
|
webapi |
_genesys.ws |
A function module has three ways it can change the value of a given functional module object or property. One of these ways is through a function. The following is the model that should be used for providing this functionality:
The names of these functions can be whatever the function module developers feel appropriate for the object as long as they adhere to the naming conventions for functions (see above for details).
The following are the rules on how these functions must behave:
Note: a negative response event is not needed because it is assumed that the object is updated (that is, it is behaving like a real function). If there is a problem, then more than likely other functions and action elements in the application will fail due to the problem and notify the application appropriately.
If none of these conditions occur then there is no need to have events associated with object modification via a function.
|
Genesys 8.1 SCXML Technical Reference |
||
< Object Model Parameter Elements > |