The following files can be edited by the user:
WWGUDFunctions.asp/WWGUDFunctions.aspx/WWGUDFunctions.jsp
WWGXMLPost.inc
This is a configuration file for the Genesys Agent Scripting application. This file contains all Genesys Agent Scripting fields that have been declared configuration file fields and their values. When a Genesys Agent Scripting application is started, it accesses this file and reads in the values.
Below is an example of the format of the file:
<WWGConfig>
</WWGConfig>
XMLServerURL is a Genesys Agent Scripting configuration field and http://localhost/WWGDemo/Server/ is the value stored in that field.
The fields Server URL and DTD URL in the XML Interface Settings window are configuration fields.
User Defined Functions
are used to customize actions in Genesys Agent Scripting. The User Defined
Functions are written in Visual Basic for ASP in a file called WWGUDFunctions.asp.
For ASPX, the functions are written in C-Sharp in a file called
Here is an example function written in Visual Basic.
<%
'--------------------------------------------------------------------------
' WWGUDFunctions.asp
' Written By:
' Date:
' Description:
Use these functions to customize
' Functions
added here should be listed in the
'
'--------------------------------------------------------------------------
'--------------------------------------------------------------------------
' Use
'--------------------------------------------------------------------------
FUNCTION
FOR
IF
END IF
FOR
idx2 = 1 TO
NEXT
NEXT
IF
IF
ELSE
END IF
ELSE
END IF
END FUNCTION
%>
Preprocessing will execute the functions and make any changes to the XML before the request is sent to the XML Server. Postprocessing takes the response sent back from the server and executes the function against that information. The following two functions are provided for the Preprocessing and Postprocessing:
XMLGlobalPreProcess
XMLGlobalPostProcess
These functions exist in the following Genesys Agent Scripting installation files for the various platforms:
Platform |
Installation File |
ASP |
Script asp Web Folder\WWGXMLPost.inc |
JSP |
Script jsp Web Folder\WWGXMLPost.inc |
ASPX |
Script aspx Web Folder\WWGXMLPostInc.aspx |
Once you compile your Project Book and deploy it to a target
folder, you can modify the file from the target folder.
The function XMLGlobalPreProcess takes as input the following parameters:
parmxml - The XML string to be sent to the XML Server
parmtargeturl - The URL string for the targeted XML Server (ASP only)
parmnodename
- The top node name of the XML string
Note:
The returned value from the function will be sent to the
XML Server.
Function XMLGlobalPreProcess(parmxml, parmtargeturl, parmnodename)
End Function
Thus, before an XML Server is called, this function will
take the XML stream and replace the word "system" with "matrix"
if the target XML Server is ”http://MyServer/MyWebApp/MyXMLServer.asp”.
The function XMLGlobalPostProcess takes as input the following parameters:
parmxml - The XML string that was returned from the XML Server
parmtargeturl - The URL string for the targeted XML Server (ASP only)
parmnodename
- The top node name of the XML string that was sent to the XML Server
Note:
The returned value from the function will be processed by Agent Scripting, mapping XML tags to their associated fields. The user can update this function to modify the returned XML string. The following is an example of this function modified for ASP:
Function XMLGlobalPostProcess(parmxml, parmtargeturl, parmnodename)
End Function
Thus, before Agent Scripting maps the returned XML stream from the XML Server to associated fields, this function will take the XML stream and replace the word "system" with "matrix" if the XML Server was "http://MyServer/MyWebApp/MyXMLServer.asp” and the top XML node name that was specified on the XML stream to the XML Server was ”MatrixTest”.