16.3 Folder Mapping Examples

This section contains examples explaining how we can practically implement Folder Mapping in Documentum.

16.3.1 Property Matching: Using Wildcard (*)

Let us begin with a simple example, where the Folder Map is configured so that the content file is placed at a specified location in the Web Cabinet if and only if the user provides some non-blank value for its subject property while creating the content.

  1. Log in as an administrator in Web Publisher and check-out the FolderMap.xml file under Site Manager | Configurations | Foldermaps. Modify the FolderMap.xml file as shown below and check it back into the Docbase.
    <folder_map>
    <rule>
    <attr_list>
    <attr>
    <name>subject</name>
    <value>*</value>
    </attr>
    </attr_list>
    <path_list>
    <path>/Test_WebCabinet/Subject_Content</path>
    </path_list>
    </rule>
    <rule>
    <attr_list>
    <attr>
    <name></name>
    <value></value>
    </attr>
    </attr_list>
    <path_list>
    <path></path>
    </path_list>
    </rule>
    </folder_map>
    

    Try creating some content using a template and leave the Subject: field blank. The following error is thrown; view it by clicking on the All Messages button in Web Publisher status bar:

    The new content cannot be created. This file, based on the folder map, cannot be linked to any Web cabinet. Your file will not be created.

  2. Create new content by providing a non-blank value for the Subject: field as shown in figure 16.4.
    16.3.1 Property Matching: Using Wildcard (*)

    Figure 16.4: Non-blank value provided for Subject property

  3. Notice that the new content is created successfully (refer to figure 16.5) under the specified Docbase location in the Web Cabinet at /Test_WebCabinet/Subject_Content.

    Note

    Ensure that the Web Cabinet Test_WebCabinet already exists in the Docbase. If it does not exist, please create it before you start creating content and trying out Folder Mapping examples.

    16.3.1 Property Matching: Using Wildcard (*)

    Figure 16.5: Content created successfully in Web Cabinet folder

16.3.2 Property Matching: Using Multiple Properties in <attr_list>

Let us now take an example where the Folder Map is configured so that the content file is placed at a specified location in the Web Cabinet if and only if two property conditions are met for the content as follows:

It should have a non-blank Name: field (object_name property) and its Subject: field (subject property) should have a value office. Until and unless both these conditions are met, the content file is not created.

  1. Log in as an administrator in Web Publisher and check-out the FolderMap.xml file under Site Manager | Configurations | Foldermaps. Modify the FolderMap.xml file as shown below and check it back into the Docbase.
    <folder_map>
    <rule>
    <attr_list>
    <attr>
    <name>object_name</name>
    <value>*</value>
    </attr>
    <attr>
    <name>subject</name>
    <value>office</value>
    </attr>
    </attr_list>
    <path_list>
    <path>/Test_WebCabinet/Official docs</path>
    </path_list>
    </rule>
    <rule>
    <attr_list>
    <attr>
    <name></name>
    <value></value>
    </attr>
    </attr_list>
    <path_list>
    <path></path>
    </path_list>
    </rule>
    

    Try creating content using a template and do any one of the following:

    • Leave the Name: field blank
    • Leave the Subject: field blank
    • Write OFFICE as the value of Subject: field
    • Provide the value of Subject: field as anything other than office, for example JUNK

    In all four cases, the following error is thrown (view the All Messages button in Web Publisher status bar) and the new content is not created in Web Publisher:

    The new content cannot be created. This file, based on the folder map, cannot be linked to any Web cabinet. Your file will not be created.

  2. Let us now provide a valid scenario. Create new content with a valid non-blank name and write office for its Subject: field as shown in figure 16.6:
    16.3.2 Property Matching: Using Multiple Properties in <attr_list>

    Figure 16.6: Valid Name and Subject fields provided during content creation

  3. The new content is created successfully (refer to figure 16.7) under the specified Docbase location in the Web Cabinet: /Test_WebCabinet/Official docs.

    As discussed earlier, you must ensure first that the Web Cabinet Test_WebCabinet already exists in the Docbase. If it does not exist, please create it before you start creating content.

    16.3.2 Property Matching: Using Multiple Properties in <attr_list>

    Figure 16.7: Content created under Official docs folder

16.3.3 Placing a Content File in Multiple Locations with <path_list>

Let us now take an example where Folder Map is configured so that the same content file is placed at two different specified locations in the Web Cabinet. An important condition that must be met for the content is that it should have a non-blank file name (object_name property).

If the above condition is met, the same content file is placed under two folders in the Web Cabinet: /Test_WebCabinet/FilePath One and /Test_WebCabinet/FilePath Two.

  1. Log in as an administrator in Web Publisher and check-out the FolderMap.xml file under Site Manager | Configurations | Foldermaps. Modify the FolderMap.xml file as shown below and check it back into the Docbase.
    <folder_map>
    <rule>
    <attr_list>
    <attr>
    <name>object_name</name>
    <value>*</value>
    </attr>
    </attr_list>
    <path_list>
    <path>/Test_WebCabinet/FilePath One</path>
    <path>/Test_WebCabinet/FilePath Two</path>
    </path_list>
    </rule>
    <rule>
    <attr_list>
    <attr>
    <name></name>
    <value></value>
    </attr>
    </attr_list>
    <path_list>
    <path></path>
    </path_list>
    </rule>
    </folder_map>
    

    Try creating content using a template and provide a non-blank file name (Name: field) as shown in figure 16.8.

    16.3.3 Placing a Content File in Multiple Locations with <path_list>

    Figure 16.8: Providing a file name while creating a new content

  2. You will notice that the new content is created successfully under two specified Docbase locations (refer to figures 16.9 and 16.10) in the Web Cabinet: /Test_WebCabinet/FilePath One and /Test_WebCabinet/FilePath Two.
    16.3.3 Placing a Content File in Multiple Locations with <path_list>

    Figure 16.9: Content created at the first Docbase location

    16.3.3 Placing a Content File in Multiple Locations with <path_list>

    16.10: Same content created under the second Docbase location

16.3.4 Property Matching: Simple Repeating Attribute

Till now we were dealing with single-valued attributes. Let us now take an example where Folder Map is configured so that the content file is placed at a specified location in the Web Cabinet if a particular repeating property condition is met for the content as follows:

Note

It should have a non-blank keywords property with abc as its first keyword.

If the above condition is met, the content file is placed within the following location in the Web Cabinet: /Test_WebCabinet/Keywords_ABC.

  1. Log in as an administrator in Web Publisher and check-out the FolderMap.xml file under Site Manager | Configurations | Foldermaps.

    Modify the FolderMap.xml file as shown below and check it back into the Docbase.

    <folder_map>
    <rule>
    <attr_list>
    <attr>
    <name>keywords</name>
    <value>abc</value>
    </attr>
    </attr_list>
    <path_list>
    <path>/Test_WebCabinet/Keywords_ABC</path>
    </path_list>
    </rule>
    <rule>
    <attr_list>
    <attr>
    <name></name>
    <value></value>
    </attr>
    </attr_list>
    <path_list>
    <path></path>
    </path_list>
    </rule>
    </folder_map>
    
  2. Try creating content using a template and do one of the following:
    • Provide ABC for the Keywords value: keywords[0]='ABC'
    • Provide xyz for the Keywords value: keywords[0]='xyz'
    • Provide xyz and abc as Keywords values. Note that here abc is the second keyword and not the first keyword.
      keywords[0]='xyz' keywords[1]='abc'
      

    You will notice that the following error is thrown (view by clicking the All Messages button in Web Publisher status bar) and the new content is not created in Web Publisher:

    The new content cannot be created.

    This file, based on the folder map, cannot be linked to any Web cabinet. Your file will not be created.

  3. Create some valid new content and provide abc for its Keywords: field as shown in figure 16.11.
    16.3.4 Property Matching: Simple Repeating Attribute

    Figure 16.11: Creating content with the keywords property set as abc

  4. You will notice that the new content is created successfully (refer to figure 16.12) under the specified Docbase location in the Web Cabinet: /Test_WebCabinet/Keywords_ABC.
    16.3.4 Property Matching: Simple Repeating Attribute

    Figure 16.12: Content created successfully under Keywords_ABC folder

16.3.5 Property Matching: Repeating Attribute Index

Let us take an example where Folder Map is configured so that the content file is placed at a specified location in the Web Cabinet. The repeating property condition that must be met for the content is that it should have a non-blank keywords property with hello as its second keyword (index position 1).

If the above condition is met, the content file is placed under the following location in the Web Cabinet: /Test_WebCabinet/Keywords_Hello.

  1. Log in as an administrator in Web Publisher and check-out the FolderMap.xml file under Site Manager | Configurations | Foldermaps.

    Modify the FolderMap.xml file as shown below and check it back into the Docbase.

    <folder_map>
    <rule>
    <attr_list>
    <attr>
    <name>keywords[1]</name>
    <value>hello</value>
    </attr>
    </attr_list>
    <path_list>
    <path>/Test_WebCabinet/Keywords_Hello</path>
    </path_list>
    </rule>
    <rule>
    <attr_list>
    <attr>
    <name></name>
    <value></value>
    </attr>
    </attr_list>
    <path_list>
    <path></path>
    </path_list>
    </rule>
    </folder_map>
    
  2. Try creating some content using a template and:
    • Provide hello as Keywords value: keywords[0]='hello' Or:
    • Provide xyz and HELLO as Keywords values. Note that HELLO is in upper case, even though it is the second keyword.
      keywords[0]='xyz' keywords[1]='HELLO'
      

    You will notice that the following error is thrown (view by clicking the All Messages button in Web Publisher status bar) and the new content is not created in Web Publisher:

    The new content cannot be created.

    This file, based on the folder map, cannot be linked to any Web cabinet. Your file will not be created.

  3. Create some valid new content and provide xyz and hello as values for its Keywords: field as shown in figure 16.13.
    16.3.5 Property Matching: Repeating Attribute Index

    Figure 16.13: Setting hello as the second keyword during content creation

  4. You will notice that the new content is created successfully (refer to figure 16.14) under the specified Docbase location in the Web Cabinet: /Test_WebCabinet/Keywords_Hello.
    16.3.5 Property Matching: Repeating Attribute Index

    Figure 16.14: Content created under Keywords_Hello folder in Web Cabinet

16.3.6 Dynamic Folder Mapping

Till now, we were considering examples where a fixed location was provided in the FolderMap.xml file based on some property values. Folder Map provides additional features to create the location/paths at run time dynamically based on some attribute/property values.

Let us take an example where Folder Map is configured so that the content file is placed within a dynamically created folder in the Web Cabinet. The property condition that must be met for the content is that it should have a non-blank subject property.

If the above condition is met, the content file is placed under the Test_WebCabinet Web Cabinet within a folder having the same name as the value provided by content creator for the content's subject property.

  1. Log in as an administrator in Web Publisher and check-out the FolderMap.xml file under Site Manager | Configurations | Foldermaps.
    <folder_map>
    <rule>
    <attr_list>
    <attr>
    <name>subject</name>
    <value>*</value>
    </attr>
    </attr_list>
    <path_list>
    <path>/Test_WebCabinet/$(subject)</path>
    </path_list>
    </rule>
    <rule>
    <attr_list>
    <attr>
    <name></name>
    <value></value>
    </attr>
    </attr_list>
    <path_list>
    <path></path>
    </path_list>
    </rule>
    </folder_map>
    

    At run time Web Publisher substitutes the value of the subject property as the name of the folder. Note that $(...) signifies run-time substitution of the specified Docbase property value.

  2. Create some new content and provide a non-blank value for its Subject: field (say test subject) as shown in figure 16.15.
    16.3.6 Dynamic Folder Mapping

    Figure 16.15: Content created with a non-blank value for subject property

  3. You will notice that the new content is created successfully (refer to figure 16.16) under the Web Cabinet Test_WebCabinet within the folder test_subject created at run time by Folder Map.
    16.3.6 Dynamic Folder Mapping

    Figure 16.16: Folder test_subject created at run time by Folder Mapping

16.3.7 Dynamic Folder Mapping with Repeating Attribute

Having gone through a simple example of dynamic folder mapping, let's now take an example where Folder Map is configured so that the content file is placed within a dynamically created folder in the Web Cabinet. The repeating property condition that must be met for the content is that it should have abc as the second keywords property: keywords[1]='abc'

If the above condition is met, the content file is placed under the Test_WebCabinet Web Cabinet within a folder having the same name as the second value provided by content creator for the content's keywords property (i.e. abc).

  1. Log in as an administrator in Web Publisher and check-out the FolderMap.xml file under Site Manager | Configurations | Foldermaps.

    Modify the FolderMap.xml file as shown below and check it back into the Docbase.

    <folder_map>
    <rule>
    <attr_list>
    <attr>
    <name>keywords[1]</name>
    <value>abc</value>
    </attr>
    </attr_list>
    <path_list>
    <path>/Test_WebCabinet/$(keywords[1])</path>
    </path_list>
    </rule>
    <rule>
    <attr_list>
    <attr>
    <name></name>
    <value></value>
    </attr>
    </attr_list>
    <path_list>
    <path></path>
    </path_list>
    </rule>
    </folder_map>
    

    Folder Map will create a folder at run time with the same name as the value of the second keyword (i.e. keywords[1]).

  2. Create some new content and write abc as the second entry in the keywords property as shown in figure 16.17.
    16.3.7 Dynamic Folder Mapping with Repeating Attribute

    Figure 16.17: Content creation with abc as the second entry

  3. You will notice that the new content is created successfully (refer to figure 16.18) under the Web Cabinet Test_WebCabinet within the folder abc created at run time by Folder Map.
    16.3.7 Dynamic Folder Mapping with Repeating Attribute

    Figure 16.18: Folder created at run time as per specified repeating property value

    Tip

    Documentum 5.3 Update

    Documentum Web Publisher release 5.3 provides you the facility to create and configure multiple Folder Maps.

There is much more to Folder Mapping than what we have discussed in this chapter. The Documentum Web Publisher manuals talk about Folder Mapping in detail and you can go through them to get a better understanding of the topic.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.40.182