| This small article describes how you could run the Livelink Builder (SDK) to debug LAPI calls. The Livelink Builder runs a single threaded livelink Application Server, in which you are able to develop and test code that interacts with Livelink, such as WebLingo, OScript and of course LAPI. In the same CD pack as your Livelink Builder you will find all the LAPI class files and the LAPI OScript Module. When you next open up the Livelink Builder, it will enumerate all the modules and XDB's in your instance. Each of the LAPI class calls are in an OSpace - or Object Space - inside one of the many Livelink Modules. This article assumes that you have installed the Livelink Builder on a development machine, which has a working development instance of Livelink, and that you have some knowledge/exposure to working with Livelink and the Builder tool itself. Before starting any work with the Builder, ensure that you make a backup of your Livelink root files to a safe place where you can restore you can restore them if needed. To test this, try removing some files on your dev instance and try restarting the Livelink Builder - or even the Livelink application for that server. Obviously livelink will throw errors. Now try the restore and see if you can start from where you where. This may save you a lot of problems later, a database backup may also be helpful. Notifications - formerly called Change Agents - should be disabled since as the Livelink Builder is single threaded, if these are not disabled then Livelink will try to run those when appropriate. This can be done by updating [loader] section of the opentext.ini file as shown in the following table :
The LAPI code is grouped into several sets of classes for ease of reference, they are :
Each object has its methods and you break points can be added either within your code or the relevant LAPI module as required. Breakpoints can be added in one of two ways. The firstly a Script level break, these stop when the Livelink application opens the WebLingo template, Script, LAPI or OScript file that has the breakpoint set in it. The second case is a Line level break, which stops when the Livelink application reaches any line in any file that has a breakpoint set on it. The latter are especially useful if you want to move through a large file and stop at several key points. The following screenshot shows a Script level breakpoint which has been added to the execute method of the ListUsers. You can tell this because of the breakpoint icon (
) appears at the start of the line on which you have set the breakpoint to indicate the breakpoint.
|