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 Asynchronous Message. 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 UDTT service URL.
The supervisor 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 Messaging section. To use the override function, perform the following key steps:
1 Initialize the override request view
The override request view is provided by UDTT, You just need to initialize it and integrate the view into your own application. The following is the sample code to initialize the override request view.
Note The following files should be included in override agent runtime path on the server side. You can find them in the <BTTInstallationPath>\lib directory.
In the teller system, the following can be customized as the real business environment:
▪ Decision logic about whether the override procedure is required
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.
▪ Selection of the override route (local or remote)
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.
The local override page should be customized. Extend the page from OverrideWizardPage to get the context for OverrideRequest and OverrideConfig. The following is the configuration segment for local override. Modify the default implementation class, com.ibm.btt.bc.override.customization.LocalOverridePage, to your own.
The following is a sample configuration for remote override. First the SupervisorSelectPage is invoked to get and put the selected supervisor into OverrideRequest.SUPERVISOR, and then the RemoteOverridePage is invoked to send the request to the overrideAgent and register to the listenerManager to receive the response from the supervisor.
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.
If you want to add the additional page in the remote override logic, extend the OverrideWizardPage and add your class name in the configuration. The UDTT 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.
In the supervisor system, the following can be customized as the real business environment:
▪ The transaction detail and the decision page
After the request item in the override request view is double clicked, The UDTT framework displays the pages that are configured in the <list> tag one by one. The following is the sample code to customize the pages.
In this sample, the showDetailsPage is displayed first. And the teller, request time, and the screen image are displayed on the teller side by default; secondly, the CommentsPage is displayed and by default the supervisor can approve or reject the request now; and then, the setResult() function can be called to send the response to the teller as configured in the following code.
getSupervisorWizard().setResult(true, null)
You can add any necessary page. For example, if you want to add an additional page to display the teller's comments, develop a page, com.xxxbank.supervisor.override.customization.MyCommentPage, which is extended from the OverrideWizardPage, and add the class name into the configuration file.