Interviewer - Server > Configuration and customization > Creating and using Interview Services
 
Creating and using Interview Services
How Interview Services works
IOM.Services is defined as a key-value pair where each key maps to one service configuration. All services are implemented with the public InterviewServices.IService interface, thus ensuring they can be handled together in the Interview Object Model (IOM). Each IOM.Services object is mapped to IService.ServiceObject, which is then published to the routing script. For example, CaDSClient.ServiceObject is mapped to the CaDSClient.Features property, making the host name, port, user name, and password properties invisible to the routing script, but visible for the CaDSClient object.
The design is based on the practice of separating the implementation of the service registration and the actual service providers. InterviewServices.dll was created to implement the services collection that can be used within an interview script. This component is not aware of any of the service provider details, including each service's configuration properties. Each service provider is implemented as a separate .dll (such as CaDSClient.dll and SalesforceService.dll).
Interview Services
The following interfaces are used for each client service provider, and are called in InterviewServices.dll.
IService
Each service provider should implement this interface.
Name As String
The service name.
Properties As Array
An array of IPropertyMetadata objects that describe the configurable properties.
ServiceObject As Object
The object that implements the service.
Configure(source)
Load settings from configuration files.
ValidateConfiguration()
Test if the properties were correctly set.
IPropertyMetadata
Name As String
The service name.
GetLabel(long LocaleID) As String
EncrptionType As String
When empty, indicates a normal string field; a string value indicates the encryption type.
Properties
The service has the following properties:
Name
Returns the service name.
Properties
Returns an array of IPropertyMetadata objects, each representing a configurable service property.
Using the IPropertyMetadata interface, it is possible to obtain a localizable table that can be used in a configuration dialog. It is also possible to determine if the field is a password and should therefore be displayed as asterisk characters (*****).
Using IBM SPSS Collaboration and Deployment Services as an example, the product has a publicly creatable object called CaDSClient.Client. This object includes the real properties URL, Username, Password, and Client. Client is an object that supports the properties Scoring, ContentRepository, and so on.
The CaDSClient.Client object supports IService as a secondary interface, which means it can be used as a service in the IBM SPSS Collaboration and Deployment Services Service Manager. The configuration interface can call IService.Properties to determine which service properties can be configured and build a list view that displays the properties and their default values. The default value can be obtained from the CaDSClient.Client object by dynamically invoking the get accessor for the real property on the CaDSClient.Client object.
As properties are changed in the property list they can be assigned back to the appropriate CaDSClient.Client object property by dynamically invoking the property's put accessor.
The IService.Properties array is used to provide information on the service's real properties. Callers such as the IBM SPSS Collaboration and Deployment Services Service Manager or the Configure Interview Services interface can access the service properties by dynamically invoking the properties.
See also
Creating Interview Services
Using Interview Services
DPM properties for the Survey Results activity
UNICOM Intelligence Dialer Software Development Kit (SDK)