Script Hooks in Server-Based Applications

Script hooks are "locations" in the SmarTeam software where the software can be set up to execute a user-supplied script and pass parameters to it. Script hooks are provided for most standard SmarTeam operations. Three different stages of a SmarTeam operation are defined for script hooks: before the operation executes, after the operation executes or instead of the operation's execution. These three operation stages are represented by the software events: Before, After, and InsteadOf operation. Thus, you specify a script hook uniquely by the SmarTeam operation and the stage with which it is associated. Accordingly, in this guide, it is convenient to refer to a script hook by a name in the form EventName OperationName, for example, Before Update, After Check In or InsteadOf Add. Note that not all operations have script hooks defined for all three of the operation stages.

In server-based applications, the code is located on the server-side along with the application. When the client activates an operation on the server application that involves calling a hook, the server application calls the relevant code.

The diagram below shows how the mechanism works.

Link to serverhooks.gif