Chapter 9. Configuration for integration of back-end system 193
15.Using your favorite DB2 command or administration utility, select all of the
rows from the audit_log table.
We have not discussed the audit logging in any detail thus far. We can see
from the rows in the audit_log table that there are four log entries created for
the trip from the inbound connector to the iSoft outbox. The status entries for
these are:
a. InitCollaboration
b. ItemAdd
c. ADD
d. Success
If you have any status of Exception, check the ICS and connector logs.
16.Still looking at DB2 tables, select all rows from the PROCESSED_GTIN table.
This table shows the list of GTINs that have been added.
9.8 Validation using the JDBC Connector
Now that we have verified that the mapping is working properly from ASBO to
GBO, we have to verify that when using the actual connector we can process
events that have been generated and, in fact, successfully generate the events in
the first place and have them picked up by the connector.
To start with, we process the event message that we generated in 9.2, “Create
and test the database trigger” on page 164. Perform the following steps:
1. Shut down the test connector.
2. Before starting the JDBC Connector, change the shortcut that starts the
JDBC Connector to point to the correct ICS. See Figure 9-30 on page 194.
Note: Another place to check now is the audit_log table in the smb_db.
194 Implementing WebSphere BI Express for Item Synchronization
Figure 9-30 Connector shortcut
3. Open the file start_JDBC.bat in the directory C:\IBM\WebSphereItemSync
\connectors\JDBC
.
4. Edit the JDBCDRIVERPATH to be c:\SQLLIB\Java\DB2Java.zip.
5. Edit the java.library.path to include c:\SQLLIB\bin as the first library in the
concatenation.
6. Save the file and close it.
7. Start the JDBC Connector.
8. The row in the event table will be processed.
9. Check the following to verify that it has been processed correctly:
a. Select all rows from the xworlds_events table in the SUPPLIER
database. This table should now be empty.
b. Select all rows from the audit_log table in the SMB_DB database. There
should be a set of audit records for this event. (You will notice that the
ADD and Success status messages indicate a verb_name of update. This
is because we used the same product_id in this test as we had used in an
Chapter 9. Configuration for integration of back-end system 195
earlier test and consequently the collaboration changed the Create verb to
an Update. This is the correct and expected behavior).
c. Check the contents of the message in the OUTBOX queue.
d. Refresh the view of the Collaboration Statistics in the System Monitor. The
counter for the ItemCommandRouterObject will have been incremented.
If this test has not worked, check the logs for the connectors and the ICS before
moving on to our final unit test for this section.
We have seen that events in the table can be processed by the connector.
Finally, we will trigger an event and allow the entire process through to the
outbox to run unassisted.
1. Using a DB2 command line utility, insert a row into the ITEM_CATALOG
table of the SUPPLIER database. (This equates to an actual application
creating a new catalog item entry.)
2. Use a new value for the UPCEANCODE so we can track it, as shown in
Example 9-3:
Example 9-3 Insert UPCEANCODE value
db2 insert into ITEM_CATALOG
(ProductId,Unitof_wgt,description,descriptionshort,upceancode)
values(‘11111111111100’,'1','Full Unit Test
Item','TEST','11111111111100')
3. Check in the same sources as the last test to validate the processing of the
new catalog item.
Note: You will notice that now the counter for the UCCnetItemSyncObject has
also been incremented because we are using the actual connector.
Note: The values that we have used in this sample for the UPCEANCODE
(which will be the UCCnet GTIN) are not necessarily valid values. You will
need to use the GTIN calculator to obtain a correct GTIN.
196 Implementing WebSphere BI Express for Item Synchronization

Get Implementing WebSphere Business Integration Express for Item Synchronization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.