public interface INeedOverride { public boolean isOverrideRequired(OverrideRequest request) throws OverrideException; }
If the OverrideRequried() function returns true, the override procedure is required; otherwise, the transaction can be submitted directly. You can wrap any data which is necessary to decide whether the override is necessary in the OverrideRequest class.
The following is the configuration segment for the INeedOverride interface. Modify the default implementation class name, com.ibm.btt.bc.override.customization.NeedOverride, to your own.
<com.ibm.btt.bc.override.customization.NeedOverride Injection="needOverride" />
public interface IRouteSelector { public abstract String getSelectedRoute(OverrideRequest overriderequest, OverrideConfig overrideconfig); }
The IRouteselector interface must be implemented to determine which kind of the override route is used. If localRoute is returned in the getSelectRoute() function, the business logic defined in <entry key="localRoute"> is executed; If remoteRoute is returned in the getSelectRoute() function, the business logic defined in <entry key="remoteRoute"> is executed. The following is the configuration segment for the override route selection.
<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.xxxbank.teller.override.customization.MyCommentPage /> <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>
<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>How to select the supervisor for the remote override (SupervisorSelectPage) and how to present the communication between the teller and the supervisor (RemoteOverridePage) can be customized. The following is the configuration segment for OverrideAgent and listenerManager. The remoteConnectorUrl should be set as the real business environment.
<com.ibm.btt.bc.override.agent.OverrideAgent id="overrideAgent" Instantiate="factoryElement" FactoryClass="com.ibm.btt.remote.ServiceProxyFactory" serviceId="com.ibm.btt.bc.override.agent.OverrideAgent" remoteConnectorUrl="http://localhost:9080/BTTOverrideTestWeb/BTTRemoteConnector"> </com.ibm.btt.bc.override.agent.OverrideAgent> <com.ibm.btt.msg.poll.PollListenerManager id="msgListenerManager" interval="1000" InitMethod="initialize" remoteConnectorUrl="http://localhost:9080/BTTOverrideTestWeb/BTTRemoteConnector"> </com.ibm.btt.msg.poll.PollListenerManager>If you want to add the additional page in the remote override logic, extend the OverrideWizardPage and add your class name in the configuration. BTT framework displays the pages one by one. For example, if you want to add one page for the teller to input comments, develop a page, com.xxxbank.teller.override.customization.MyCommentPage, which is extended from the OverrideWizardPage, and add the class name into the configuration file.
<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.xxxbank.teller.override.customization.MyCommentPage /> <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>