Adding New Scripted Operations

This section describes the procedure for creating a new scripted operation.

1. Create an entry in the database.dat file

Set the responsibleDHS to ’self’. Set the externalName parameter to the name of your new operation file without the .tcl extension.

2. Create the new operation file in the dcss operation directory, dcss/scripts/operations

3. Within the new operation file define two procedures, where the operationName is replaced by the name of the new operation.

• proc operationName initialize {} This procedure is executed when DCSS starts up. This procedure may be empty, or it may be used to initialize variables associated with the scripted operation.

• proc operationName start { [arg1 [arg2 [arg3 [args]]]]} The operationName start procedure is executed when a start_operation message is received by the scripting engine. This procedure should contain the actual functionality if the operation. The arguments passed to this procedure are the same arguments passed to the initiating command:

start_operation operationName [arg1 [arg2 [arg3 [...]]]].

4. Restart DCSS.