Checks and Functions

The purpose of checks and functions is to ensure that your individual criteria regarding form and content of your CMS files are met. The checks and functions are Tcl routines that are processed whenever particular application events occur in the Content Management Server, for example, when an editor changes the content of a file. These Tcl routines are part of file format and field definitions. They can be entered directly in the configuration user interface of the editorial system, meaning that no shell access to the system is required.

Checks

Checks are Tcl routines that are executed in addition to the checks the system performs. They give you the possibility to attach your own additional conditions to the completion of an operation. The release of a file, for example, is only possible if the file is complete. One built-in criterion for completeness is that all internal links point to existing CMS files. By writing another checking routine, you can extend the list of completeness criteria so that a file can only be released if the system's criteria plus your own ones are met. There are two types of checks that can be defined for each file format:

  • Using the Creation Check for Files in the Folder you can, for example, check during file creation in a folder whether the subfile is based on a format valid for subfiles.

  • Using a Completion check you can check versions to see if they are complete according to your criteria. The Tcl code for the creation check for subfiles or the completion check can be defined in file formats.

Functions

Functions are also custom Tcl routines. The system calls them after an editor has changed the contents of a field but before the modified content is stored in the draft version. Therefore, functions are suitable for analyzing content and, if necessary, for changing it.

  • The Value Assignment Function of a field is always called when the value of a field is changed. You can use this feature to check whether a field has an acceptable value and to change the value if necessary.

  • You can use the Value display function for fields in order to calculate the field value to be displayed in the Content Navigator. The Tcl code of a value assignment function or a value display function is part of a field definition.

  • You can specify a Version assignment function or a workflow modification function in the file format definition. The version assignment function is used to verify the consistency of the field values of a version and is called by the Content Management Server before it sets the field values of a version.

  • Finally, you can use the Workflow modification function to modify the workflow of a draft version before the version is created.