Configuring the teller system

About this task

The teller system is an Eclipse rich client. The communication protocol between the teller system and the supervisor system is HTTP. However, you can configure the system with JMS. For more details about the configuration, refer to the Asynchronous Message section. To use the override function, perform the following key steps:
  1. Wrap request data
    Wrap your own request date in the OverrideRequest class which is Map.
    public class OverrideRequest implements Map<String, Object>, Serializable {
    ...
                 //There are the default key values in the OverrideRequest class
    
                 public static final String _TELLER = "teller";
    
    	            public static final String _AMOUNT = "amount";
    
    	            public static final String _TRANSACTION_TYPE = "transaction_type";
    
    	            public static final String SUPERVISOR = "supervisor";
    ...
    }
    The default key values are designed in the OverrideRequest class. You can also store any other pairs of Key and Value in OverrideRequest. The values of teller, transaction_type, and supervisor are required before sending the request.
  2. Invoke the override procedure
    Initialize OverrideManager from the configuration file, and then execute the business logic override. Here is the sample code.
    //Read the configuration file
    ElementFactory factory = new BasicElementFactory(
                 "jar:///com/xxxbank/teller/config.xml");
    
    //Get OverrideManager
    OverrideManager overrideManager = (OverrideManager) factory.getElement("overrideManager");
    
    //Invoke business component override
    //Parameter
    //          request; request data wrapped in OverrideRequest 
    //          target: the pointer of teller current working area (OverrideTestComposite.this is the current teller working area pointer)
    boolean code = overrideManager.override(request,OverrideTestComposite.this);
    The current working area in the teller system is locked until the override process is complete.
  3. Configure the service URL in the configuration file
    The following is the sample configuration file. Locate remoteConnectorUrl and change its value to your own BTT service URL.
    <config>
              <com.ibm.btt.bc.override.OverrideManager id="overrideManager">
                        <ref refId="overrideConfig" Injection="overrideConfig" />
              </com.ibm.btt.bc.override.OverrideManager>
    
              <com.ibm.btt.bc.override.OverrideConfig id="overrideConfig">
          
                         <com.ibm.btt.bc.override.customization.NeedOverride
    			                         Injection="needOverride" />
                         <com.ibm.btt.bc.override.customization.RouteSelectPage
    			                         Injection="routeSelector" />
                         <map Injection="routes">
                                   <entry key="localRoute">
                                             <list Injection="value">
                                                       <com.ibm.btt.bc.override.customization.LocalOverridePage
    						                                                 name="localOverride" />
                                             </list>
                                   </entry>
                                   <entry key="remoteRoute">
                                             <list Injection="value">
                                                       <com.ibm.btt.bc.override.customization.SupervisorSelectPage
    						                                                 name="selectSupervisor">
    
              <com.ibm.btt.bc.override.customization.SupervisorProviderImpl
    							                                                       Injection="supervisorProvider" />
                                                       </com.ibm.btt.bc.override.customization.SupervisorSelectPage>
                                                       <com.ibm.btt.bc.override.customization.RemoteOverridePage>
                                                                 <ref Injection="listenerManager"
    							                                                         refId="msgListenerManager" />
                                                                 <ref Injection="overrideAgent"
    							                                                         refId="overrideAgent" />
                                                       </com.ibm.btt.bc.override.customization.RemoteOverridePage>
     
                                             </list>
                                   </entry>
                        </map>
              </com.ibm.btt.bc.override.OverrideConfig>
              
              <com.ibm.btt.bc.override.agent.OverrideAgent id="overrideAgent"
    		                 Instantiate="factoryElement"
    		                 FactoryClass="com.ibm.btt.remote.RemoteProxyFactory"
    		                 serviceId="com.ibm.btt.bc.override.agent.OverrideAgent"
    		                 remoteConnectorUrl="http://9.125.15.43:9080/BTTOverrideTestWeb/BTTRemoteConnector">
              </com.ibm.btt.bc.override.agent.OverrideAgent>
    
              <com.ibm.btt.msg.poll.PollListenerManager id="msgListenerManager"
    		                 interval="1000" InitMethod="initialize"
    		                 remoteConnectorUrl="http://9.125.15.43:9080/BTTOverrideTestWeb/BTTRemoteConnector">
              </com.ibm.btt.msg.poll.PollListenerManager>
    </config>
See Teller system configuration for reference.