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 :
OpenText.ini Entry | Description |
---|---|
#load=sockserv;agents;notify | The default should look something like this, will the entire line commented out. |
#load=sockserv;agents; | Notify commented out. |
load=sockserv | This should be the standard LAPI development mode. |
LAPI Class | Description |
---|---|
DAPI | The Document API is in the OSpace APIDOC->APIDocuments and contains all the functions that interact with documents, such as AddDocument. |
UAPI | The User API is in the OSpace APIUSER->APIUser and contains all the functions that interact with Users & Groups and Livelink's ACLs - Access Control Lists - such as ListUserGroup. |
WAPI | The Workflow API is in the OSpace APIWORK->APIWork and contains all the functions that interact with Livelink's Workflow and Form modules, such as StartWorkFlow. |
APISEARCH | The Search API is the OSpace that contains all the functions that interact with Livelink's Search and Indexing components. |
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 (), as opposed to the normal icon (), in the top right corner. Clicking on the icon toggles the breakpoint on and off.
Within each file, you can also set a breakpoint on a given line within a file which may or may not already contain one or more Line level breakpoints or possibly even a Script. This is done by right clicking on the relevant line and selecting Set Break option from the context menu as shown in the screenshot below. A red diamond () appears at the start of the line on which you have set the breakpoint to indicate the breakpoint. As you can see the Livelink Builder can be used to assist in the development and maintenance of LAPI code as well as standard OScript - for which is more commonly known and used. Now your debugging starts and welcome to the world of Assocs, RecArrays and Lists.Happy programming. And of course as every OOP person knows ‘this’ is your object.