Rules precedence and default rule

Build 1501 on 14/Nov/2017  This topic last edited on: 5/Aug/2014, at 16:37

A clientTemplate rule applies to all objects of the specified type – including objects of derived types.

So for example, a rule for folderObject:

extapp8

will also apply to images, videos, audios, etc.

    . . .

    <rules>

      <item 

       objectType="folderObject" 

       attribute="data" . . . />

     . . .

If more than one rule applies to the same object, the system selects the more specific one. For example, if there is a rule for folderObject and one for image, (where image descends from folderObject):

extapp9

The system will use the image rule for image objects, since it is the more specific definition, and the folderObject rule for objects of other types which descend from folderObject.

    . . .

    <rules>

      <item 

       objectType="folderObject" 

       attribute="data" . . . />

      <item 

       objectType="image" 

       attribute="data" . . . />

     . . .

It is not possible to define more than one rule for the same object type. This causes an error 1203 when the system loads the clientTemplate.

It is possible to define a default rule omitting the object type:

extapp10

The default rule will apply to all objects whose type does not match any other rule.

    . . .

    <rules>

      <item 

       attribute="data" . . . />

     . . .

If there is no default rule, (which is legal,) it may be possible that certain object types will not match any rule.

Objects which do not match any rule cannot be checked out.

Attempts to check-out objects for which there is no rule defined causes an error 1201.