Foreign Exchange is the business component responsible for exchanging one type of currency for another type, for example US Dollar for Canadian Dollar. The exchange is a buy-and-sell transaction, where the buy transaction results in the financial institution receiving money in one currency, and the sell transaction results in its giving the customer the money in a different currency. The exchange can be cash for cash, cash for check or negotiable instrument, check or negotiable instrument for cash, or a debit/credit offset. These difference forms of currencies are referred as monetary items types.
The typical source of data used by the component's business logic is a table that contains the conversion rates between the currencies specified in the request criteria. Two implementation samples of Foreign Exchange data storage are provided: one sample stores the conversion rates in the FXRates DB2® table, and the other sample stores the conversion in an XML file, which is accessed by the BTT ElementFactory.