The completionCheck Base Function

The completionCheck function maintains the messages and the result of the completion check. It calls the specified checking routines. For each checking routine to be called, its name plus the list of required parameters needs to be specified.

To the checking function, the contentId is passed as the first argument, followed by the arguments that were specified explicitly.

The checking function returns the list of messages for the user. The completionCheck base function collects all messages. After all checks have been performed, the Content Manager (CM) causes the completion check to fail if the message list is not empty.

Source: shareScriptDir/cm/serverCmds/completionCheck.tcl

Syntax

completionCheck checkFuncAndArgs ...

Example

objClass withName image set completionCheck {
  completionCheck {::check::imageSize sizes {100x40 100x80}}}

When the CM executes the completion check for the file version $contentId, completionCheck calls the checking function ::check::imageSizes, passing three arguments to it: $contentId, "sizes", and {100x40 100x80}.

Extension Options

Inside the completionCheck, every function registered in the safe interpreter can be used that expects the first argument to be a contentId and optionally makes use of the other arguments passed to it. The function needs to return a list of messages to indicate that one or more checks failed.

It is appropriate to define these functions in the ::check namespace, analogously to the predefined functions ::check::links and ::check::imageSize.