6320ch_DEV_post_migration.fm

Draft Document for Review July 28, 2004 7:33 pm

(<storeId>, <custominterface>, <customclass>, current timestamp)

Where <storeId> is the store ID, <wc56interfacename> is the name of the WebSphere Commerce V5.6 interface, matching the original WebSphere Commerce Suite V5.1 interface, and <customclass> is the full name, including package, of the custom version of the WebSphere Commerce V5.6 implementation class.

In our example, we used the following SQL:

insert into cmdreg

(storeent_id, interfacename, classname, lastupdate) values

(10001, ‘mypackage.MyApplyShippingCmd’, ‘mypackage.MyApplyShippingCmdImpl’, current timestamp)

6.Register the new command as a calculation method in the calculation method registry by issuing the following SQL:

insert into calmethod (calmethod_id, storeent_id, calusage_id,taskname, subclass)

values (<newMethodId>,<storeId>,<calusageId>,<custominterface>,12)

Where <newMethodId> is a new unique value for the CALMETHOD_ID column of the CALMETHOD table, <storeId> is the ID of the store, <calusageId> is the calculation usage ID for the new command (refer to Table 8-1 on page 133), and <custominterface> is the full name, including package, of the interface created earlier.

We used the following SQL:

insert into calmethod (calmethod_id, storeent_id, calusage_id,taskname, subclass)

values (1000,10001,-2,’mypackage.MyApplyShippingCmd’,12)

7.Register the new calculation method to be used in your store for applying the corresponding calculation usage. This is done by adding an entry to the STENCALUSG table. This table will already contain entries for the default methods, using the store ID -1. As such, you can base the entry for your store on one of these entries shown in the following example:

Example 8-6 Registering calculation method

insert into stencalusg (storeent_id,calusage_id,actcc_calmethod_id,actrc_calmethod_id, calcode_id,calmethod_id_app,calmethod_id_sum,calmethod_id_fin, usageflags,calmethod_id_ini,sequence)

select <storeId>,calusage_id,actcc_calmethod_id,actrc_calmethod_id, calcode_id,<newMethodId>,calmethod_id_sum,calmethod_id_fin,usageflags, calmethod_id_ini,sequence

from stencalusg

where calusage_id=<calusageId>

138Keeping Commerce Applications Updated WebSphere Commerce 5.1 to 5.6 Migration Guide

Page 156
Image 156
IBM SG24-6320-00 manual Example 8-6 Registering calculation method