Extending the Data Warehouse sample

The Data Warehouse sample can be extended, or used in other message flows in its existing form. Although the version of the sample that is provided performs no processing on the contents of the message, such as validation or applying business rules, you can add such processing.

The processing in the Warehouse_Input_Message Compute node that converts the incoming message to a BLOB and inserts it into a database can be added, in its current form, to another message flow with little or no change. You can extend its potential for reuse by converting it into a subflow.

In the supplied version of the sample, the whole of the message tree from the input message is inserted into the database in one insertion. You might want to split the message into multiple pieces before inserting it into the database, or archive only one portion of the message tree, in which case you must supply a different field reference to the ASBITSTREAM function.

In this sample the input message that is used is a WebSphere MQ message containing a payload in XML format. Other types and formats of messages can be archived in the same way with modification to the message flow. After a message has been parsed, and the message tree built, the processing is the same as for this sample.

When you use this type of archive technique, you must ensure that the most suitable data store is used to hold the data. In some situations, like the long term storage of data, a database is the correct place to hold information. A database is not good for holding short term information that is used in the course of message flow execution. For such a situation you might want to look at the use of WebSphere MQ messages instead, for example, use the MQOutput node to write messages and the MQGet node to retrieve them. The best use of WebSphere MQ messages is to store information short term. For long term storage of data you might want to consider a database. For an illustration of how to use the MQGet node in a message flow look at the Coordinated Request Reply sample.

When you are using the sample in other situations, you are likely to have to change the Data Source name for the Database node, which is specified on the Basic properties tab of the Database node. This property specifies into which database the insert must be placed.

When you are making changes, it is good practice to review all of the parameter settings on the nodes to ensure that they are compatible with your requirements.

Back to sample home