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
- Create a request handler to process the ESP request. The standard key names passed are “Service“, “Method” and “Parameters“:
- Send back the response passing the results in a KeyValueCollection (responseParameters):
Having developed the ESP server the steps to invoke it are as follows:
- In CME, create a new template of type “Third Party Server”
- 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
- On the connections tab of each primary Interaction server, add a connection to the ESP server application
- On the connections tab of each primary URS server, add a connection to the primary Interaction Server
- Write a strategy to call the ESP service using an ESP block
My test strategy does the following:
- Initialises strategy variables
- Calls a service and associated service method via the ESP server.
- Assigns the result from the KVP returned to the relevant strategy variables
- Attaches the results to the call