Start-up FunctionThis function is called at the start of the operation. The argument is the local module URL. The function return value is ignored. If this function throws an error, that is also ignored and recorded in the server error log. This function must have this exact name: dscustom::importModuleVersionsStart <module url> => {} For example: package provide dscustom 1.0 proc dscustom::importModuleVersionsStart {moduleUrl} { <perform some setup work> return } You would call this function from this system: dscustom::importModuleVersionsStart sync:///Modules/cat/MyMod Per-version FunctionThis function runs for each module version selected to be passed back to ENOVIA. The argument is the local module version URL. The function return value must be a list that is either empty or contains pairs of property names and values. If the functions throws an error, or returns a value in an incorrect format, this is ignored (treated as a return value of an empty list) and is recorded in the server error log. This function must have this exact name: dscustom::importModuleVersionsProcess <module version URL> => {name value …} For example, this function includes the value of property "p1" for each module version: package provide dscustom 1.0 proc dscustom::importModuleVersionsProcess {moduleVersionUrl} { set propName p1 set val [url getprop $moduleVersionUrl $propName] return [list $propName $val] } This function is called multiple times, once for each module version: set userProps [dscustom::importModuleVersionsProcess {sync:///Modules/cat/MyMod;1.1} ] … set userProps [dscustom::importModuleVersionsProcess {sync:///Modules/cat/MyMod;1.2} ] … Completion FunctionThis function runs at the end of the operation to perform any necessary clean-up tasks. The argument is the local module URL. The function return value is ignored. If this function throws an error, that is also ignored and recorded in the server error log. This function must have this exact name: dscustom::importModuleVersionsEnd <module url> => {} For example: package provide dscustom 1.0 proc dscustom::importModuleVersionsEnd {moduleUrl} { <perform some cleanup work>' return } Making the Custom Code Available to the Server
|