Trade Lifecycle Management White PaperPublished by Sybase Interoperability ServicesOctober 2003ContentsOverviewThe purpose of this white paper is to document the implementation and configuration of a simple trade lifecycle scenario as well as discuss the issues encountered during testing. The scenario used for testing was that of a customer sending a quote request and the vendor replying with a quote. For testing, the FIX 4.2 protocol was used in conjunction with the following products:
The following diagram depicts the testing environment as well as the flow of data used in the scenario. While the diagram depicts both a customer and a vendor environment, all testing was completed on a single machine running the Microsoft Windows 2000 operating system. ImplementationThe diagram above depicts a simple scenario where a customer creates stock quote requests and the vendor processes the request and responds to certain requests with an actual quote. This section will explain the details of the testing scenario.
Configuration
The EP suite and MQ products should be installed first as the New Era of Networks and FinancialFusion products depend on those products already being installed. Please see Issue 1 before installing any of the FinancialFusion products. For other installation issues please consult the appropriate documentation for each product. Once all of the products are installed you will need to preform several configuration tasks before you have a useable environment. This section will explain how to configure your environment to run the test scenario described above. Please review Issue 4 for information regarding the configuration of ASE before you begin configuring the rest of your environment. All of the necessary files for the test scenario can be found in the tlm_scenario.zip file, available here. Configuring the FinancialFusion Message BrokerDatabase creation Once the Message Broker is installed you will need to create a database for the design-time and run-time Message Broker repositories. (You may create two separate databases, one for design-time and one for run-time, however the testing environment placed both repositories in a single database.) This database must be created manually before the Message Broker Manager can create the database schema. Please see Issue 2 for details regarding the creation of the Message Broker database. Creating the connection profiles After you have created the Message Broker database you can use the Message Broker Manager to automatically create the database schema. In order to allow the Message Broker Manager to do this, you must first create a connection profile to your Message Broker design-time repository.
Automatic table schema creation Once you have created your two connection profiles select the profile that corresponds to your design-time repository and click the Connect button in the Connection Profiles dialog. The first time you attempt to connect you will be prompted to create a new repository. When you click the Yes button you will be asked to give the new repository a name. You must accept the default value of Message Broker (Please see Issue 5 for details.) Once you have given the repository a name the Message Broker Manager will create the table schema in the database your connection profile points to and connect you to the design-time repository. Importing FIX collections You will be unable to connect to the run-time repository until you import the appropriate FIX collections to your design-time repository and then deploy them to your run-time repository. The FIX Adapter comes with all of the necessary FIX collections for you to import into your design-time repository. These collections are available in XML files in the %FFSINSTALLDIR%\FIX\xmls directory. You may import the collections for all of the FIX versions, or you may import only the versions you will be using. The testing scenario only made use of the FIX 4.2 collections. To begin importing the FIX collections right-click on your design-time repository instance from the Message Broker Manager and select Import... from the pop-up menu. The first XML file you must import is MsgCollection.xml this defines the top level message collection to which the specific FIX version collections will be added. Next you must import the following files:
After these files have been imported you may import the FIX version specific XML files that you will be using. The test scenario only used FIX 4.2 and so the FIX42.xml and FIX42Route.xml files were imported. The only stipulation is that the 'Route' XML files be imported after the generic XML files (i.e. FIX42Route.xml after FIX42.xml). The import process may take a while to complete, however, if you suspect the import process may have stopped check the ASE error.log file located in the %SYBASE%\ASE-12_5\install directory for any possible error messages. Deploying FIX collections Once you have imported all of the necessary FIX collections you may deploy them to your run-time repository. To deploy the FIX collections right-click on your design-time repository instance from the Message Broker Manager and select Deploy to Connection Profile... from the pop-up menu. Select the connection profile that corresponds to your run-time repository and click the Deploy button. The initial deployment will create and populate the table schema in the run-time repository database. The deployment process will also generate the associated Java class files. The Java source files and the class files are placed in the %MB60INSTALLDIR%\generated directory and are jarred together in the %MB60INSTALLDIR%\runtime directory. The deployment process may take a while to complete, however, if you suspect the deployment process may have stopped check the ASE error.log file located in the %SYBASE%\ASE-12_5\install directory for any possible error messages. Once you have successfully deployed your FIX collections to your run-time repository you can connect to your run-time repository through the Message Broker Manager using the connection profile you created for it. Configuring the FinancialFusion GlobalFIX AdapterDatabase creation After installing the FIX Adapter you will need to create the FIX databases manually. The FIX Adapter comes with three SQL scripts you will use to create the necessary databases. These scripts can be found in the %FFSINSTALLDIR%\FIX\database\scripts directory. Issue 3 describes the necessary modifications that must be made to these scripts before you can successfully create the FIX databases in your environment. After you have modified the three scripts you can run them from the command line using isql as follows with a user who has been assigned 'sa' privileges: isql -U<username> -P<password> -S<servername> -i<scriptname> Creating the connection profiles Once the databases have been created you may continue the configuration of the FIX Adapter from the GFIX Manager. Start the GFIX Manager from Start-->Programs-->FinancialFusion-->TradeForce for GlobalFIX 5.0-->GFIX Manager. Next you must create a connection profile to the FIXServer_cf database you created with the FIXServer_cf.sql.ase SQL script.
Connect and configure the default server Once you have created your connection profile select the profile you created and click the Connect button in the Connection Profiles dialog. After connecting to your FIXServer_cf database you must configure the default server instance. Navigate through the GFIX Manager to the default server instance. Select the server instance, right-click it, and select Properties... from the pop-up menu. Please see Issue 6 and Issue 7 for information on modifying the values in the Server Properties... dialog. Starting the default server Once the server properties have been configured correctly you may start the server instance. Simply select the server instance in the GFIX manager, right-click it, and select Start from the pop-up menu. When the Starting Server... dialog reports that it is done you can click the Done button to return to the GFIX Manager. If the server started successfully, you will see a message stating that the server is running on the Server Message Load tab in the GFIX Manager. If the server did not start successfully, you can check the FIXServer.log file located in the %FFSINSTALLDIR%\FIX\bin directory for any error messages. Session creation Once the server has started you can create Sessions that will communicate and send FIX messages. In the testing scenario, both the customer and vendor sessions were created on the same server instance for simplicity. The following steps describe how to create these two sessions.
To create the vendor session repeat the steps above but enter the following information at step 2: Session ID: VendSession Connecting to the sessions You may now connect to the sessions by selecting a session from the GFIX Manager, right-clicking it, and selecting Connect from the pop-up menu. Since the two sessions are configured to communicate with each other and are running on the same server instance connecting one session also connects the other session. You can check that the sessions are connected by clicking the Start button on the Session Status tab for each session in the GFIX Manager and verifying that the Connection Status field says 'Connected'. Configuring the IBM MQ Series QueuesSeveral MQ queues were used in the test scenario. To create the necessary queues open the MQSeries Explorer from Start-->Programs-->IBM MQSeries-->MQSeries Explorer, navigate to your queue manager, expand the queue manager, and right-click the Queues folder, then select New-->Local Queue from the pop-up menu. Enter ERROR as the queue name in the dialog that appears and repeat this process to create the following queues:
Configuring the FinancialFusion GlobalFIX Adapter for EAIAfter you create the MQ queues, you can configure the GlobalFIX Adapter for EAI (EAI Adapter). If you have not already done so, execute setup.exe from the %FFSINSTALLDIR%\FIX\add-ons\JMSAdapter directory to install the EAI Adapter. After the installation completes you will need to run the installJMSEAServer.bat file and modify the JMSFIXAdapter.props file located in the %FFSINSTALLDIR%\FIX\add-ons\JMSAdapter\bin directory. In the JMSFIXAdapter.props file you will need to modify the following properties to conform to your environment: callback.queue.manager=<queue_manager_name>This will enable the VendSession to place FIX messages on the FROM_CUST queue. The test scenario did not make use of the JMSFIXReceiver piece of the EAI Adapter as the scenario accessed the FIX Adapter's Send API directly. Configuring the New Era of Networks e-Biz IntegratorPlease see the EBI documentation for detailed steps to create the rules and formats database using inst_db.exe. Modifying the nnsyreg.dat file After you create the rules and formats database you must to modify the nnsyreg.dat file located in the %NNSY_ROOT% directory. In the file you must define configuration information to communicate with your MQ queues. Modify the nnsyreg.dat file as follows:
These changes to the nnsyreg.dat file will allow your EBI installation to communicate with your MQ queues. Importing FIX rules and formats In order to process FIX formatted messages with EBI, you must import FIX rules and formats into the rules and formats database. These rules and formats are provided as the GlobalFIX Library for EAI as part of the EAI Adapter. You can find rules and formats for the various FIX versions in the "%FFSINSTALLDIR%\GlobalFIX Library for EAI" directory. Please see the EBI documentation for detailed instructions on importing rules and formats into the rules and formats database. The rules and formats provided by the EAI Adapter are provided as a starting point for handling FIX formatted messages and will, most likely, require some modification before use. The test scenario made use of the rules and formats for the QuoteRequest FIX message. Format modification The format used in the test scenario for QuoteRequest FIX messages is named FIX.42.IC.RQuoteRequest. This compound format includes another compound format named FIX.42.IC.NoRelatedSymRepGrp that must be modified. The FIX.42.IC.NoRelatedSymRepGrp format needs three of its included flat formats to be modified. To modify these formats from the Formatter GUI, expand the format in the left hand tree view, select each flat format, and click on the Properties tab.
Rule creation After you modify the FIX.42.IC.NoRelatedSymRepGrp format, you can use the Rules GUI to create the necessary items for processing QuoteRequest FIX message elements and routing the messages to their appropriate destinations. In order to evaluate individual fields of the QuoteRequest FIX messages you will first need to create a new Formatter Message Type using the Rules GUI. After connecting to the Rules GUI right-click on the GFIX_MSGS application and select New-->Formatter Message Type from the pop-up menu. In the Message Type dialog that appears select FIX.42.IC.RQuoteRequest from the list of available message types, add it to the current list, and then click OK. You should now have two message types available, FIX.IF.Blob and FIX.42.IC.RQuoteRequest. Previously you configured the DefaultMessageType property for EBI to be FIX.IF.Blob. This tells EBI to process all incoming messages against the rules defined for the FIX.IF.Blob message type. You will now modify one of the existing rules for the FIX.IF.Blob message type to re-evaluate QuoteRequest FIX Messages into the newly created FIX.42.IC.RQuoteResquest message type. To do this navigate through the Rules GUI to the GFIX_MSGS-->FIX.IF.Blob-->GFIX4.2.IC.R rule, select it, right-click the GFIX.4.2.IC.R subscription that is listed in the right-hand pane, and select Properties from the pop-up menu. In the named dialog for the subscription remove any existing actions and then add a new re-evaluate action. For this action select GFIX_MSGS for the Application Group and FIX.42.IC.RQuoteRequest for the Message Type. You will now define the rules EBI will use to route the QuoteRequest FIX messages to the next step in the process. The test scenario simply defined two rules to evaluate the stock symbol of the QuoteRequest and then place it on the appropriate MQ queue. In the test scenario if a QuoteRequest contained the Sybase stock symbol (SY), it was routed to the QR_SY MQ queue; if not, it was sent to the QR_OTHER MQ queue and discarded for simplicity. To create the rules for the test scenario, follow these steps:
Subscription definition After you create the two rules, you need to define a Subscription for each of the rules. Subscriptions define what actions to take if the rule is successfully evaluated. To create the subscriptions and associate them to each rule, follow these steps:
Configuring the New Era of Networks Process ServerPlease see the PS documentation for detailed instructions on how to configure the PS run-time and configuration databases using inst_db.exe. Modifying the nnsyreg.dat file After you configure the run-time and configuration databases you need to modify the nnsyreg.dat file located in the %NNSY_ROOT%\Process Server-3_9\bin directory. You need to define configuration information to communicate with the QR_SY MQ queue as well as the EAS_QR EAServer JMS queue. Make the following modifications to the nnsyreg.dat file to run the test scenario:
Business process creation In the nnsyreg.dat file, you specified a business process (Handle_SY_QR_Process) and a map (FIX_QR_ESMap)that do not exist yet. The following steps will show you how to create those two items. Launch the Process Designer from Start-->Programs-->New Era of Networks-->Process Server 3.9-->Process Designer 3.9 to begin. You must first import the FIX.42.IC.RQuoteRequest format from the formatter database to create an Event Set and a Map that the business process will use.
After creating the two event sets you can begin to create the business process.
Now you will import an event for the business process.
Next you will create a key for the business process.
The next step is to create a task for the business process. This is where all of the business logic resides.
Finally, you need to set the completion criteria for the business process.
Save the changes made to the business process by right-clicking the business process and selecting Save Changes from the pop-up menu. After completing the steps outlined above, your business process tree should look like the following image: Configuring the Sybase EAServerThe following steps will show you how to configure EAS to run the test scenario. You will need to configure the EAS Message service to accept the messages output by PS, deploy the message driven bean (MDB) to create and send Quote FIX messages, and deploy the customer facing web application. Configuring the message service Ensure your EAS instance is running before bringing up Jaguar Manager. Start Jaguar Manager from Start-->Programs-->Sybase-->EAServer 4.2.0-->Jaguar Manager and then connect to your EAServer instance. Once you are connected, navigate to the Jaguar Manager-->Message Service folder. When you select the Message Service folder, you will be asked if you would like to configure the message service. If you do not receive this prompt, you may right-click the Message Service folder and select Configure Message Service from the pop-up menu. The wizard will guide you through the configuration steps.
Once the server has restarted, you may add the message queue to which PS will send its messages.
Deploying the Message Driven Bean The message driven bean is contained in the FIXPack.jar file (from the tlm_scenario.zip file). To deploy and configure the message driven bean, complete the following steps:
Deploying the web application The FIXApp.war file contains the customer facing web application. To deploy and configure the web application, complete the following steps:
Configuring logging The MDB and the web application make use of the Apache log4j logging API. In order to enable logging for these components you need to add the text found in log4j.txt (from the tlm_scenario.zip file) to the %EAServer%\java\classes\log4j.properties file. Configuring access to FinancialFusion classes In order for the message driven bean and the web application to function properly, they both need access to some of the FinancialFusion class files. To provide access to these classes simply copy the user_setenv.bat file (from the tlm_scenario.zip file) into the %JAGUAR%\bin directory. When you restart your EAS instance, this batch file will be executed and the necessary JAR files will be added to the server's CLASSPATH and BOOTCLASSPATH environment variables. You may now restart your EAS instance by navigating to Jaguar Manager-->Servers-->Jaguar, right-clicking on the Jaguar server instance, and selecting Shutdown and Start from the pop-up menu. Once the server has restarted, you can access the customer facing JSP from the following URL: http://<servername>:<port>/FIXApp/QuoteRequest.jsp. Please see the EP documentation for detailed instructions on how to create a JSP Portlet from the QuoteRequest.jsp. ExecutionThis section will describe how to execute the test scenario assuming you have successfully completed all of the necessary configuration steps. The test scenario requires several server components to be running. Ensure that each of these components are running before attempting to execute the test scenario.
If any of the above components are not running, the test scenario will not run through completion. However, you may run the test scenario with some of the components shut-down to verify that the various messages are being sent properly. For example, you may shut down EBI to stop the message after the vendor's FIX Adapter sends it to the MQ queue to verify it contains the proper information. When you re-start EBI, the message will be picked up and the scenario will continue. This allows you to step through the scenario and verify that each component is functioning properly. Once each component is up and running, you may initiate a quote request by navigating to http://<servername>:<port>/FIXApp/QuoteRequest.jsp and entering a stock symbol and a quantity. The test scenario has three possible outcomes:
IssuesIssue 1: Microsoft Java virtual machine causes FinancialFusion installer to stop processing
Issue 2: Message Broker database must be created manually
Issue 3: ASE database scripts must be modified
Issue 4: ASE database parameters must be modified
Issue 5: Message Broker repository name must be 'MessageBroker'
Issue 6: The FIXServer instance requires a password to be set for the jagadmin user
Issue 7: User ID and Password must be set on server properties in the GFIX Manager
|

Back to Top