How to implement an ESP Server

ESP is a mechanism by which you can extend the functionality available in routing strategies. The Platform SDK provides the tools you need to write your own server component to listen for and respond to ESP requests. This is how.

The ESP server is developed in C# .NET using the Genesys Platform SDK.

  • An “ExternalServiceProtocolListener” instance is initialised and the service endpoint which specifies the port which the ESP server listens on is passed as a parameter. Note that this port number much match the port number configured on the CME application object (See below)
  • Create a new “RequestBrokerService” instance using the broker service factory
  • Register a request handler for ESP requests (Request3rdServer) with the request broker

Image

  • Create a request handler to process the ESP request. The standard key names passed are “Service“, “Method” and “Parameters“:

Image

  • Send back the response passing the results in a KeyValueCollection (responseParameters):

Image

Having developed the ESP server the steps to invoke it are as follows:

  1. In CME, create a new template of type “Third Party Server”
  2. Create an application object named using the template to represent the ESP Server component. It is important that the host and port be configured properly as Interaction Server will use these to establish a connection with the ESP server
  3. On the connections tab of each primary Interaction server, add a connection to the ESP server application
  4. On the connections tab of each primary URS server, add a connection to the primary Interaction Server
  5. Write a strategy to call the ESP service using an ESP block

My test strategy does the following:

  1. Initialises strategy variables
  2. Calls a service and associated service method via the ESP server.
  3. Assigns the result from the KVP returned to the relevant strategy variables
  4. Attaches the results to the call

Image

Image

Image

Image

Image

Image

Share

Leave a Reply