Assigning FileNet P8 classes or properties dynamically

If you want to assign document or record classes based on metadata values, you can dynamically assign classes to avoid complicating your task route with class-specific conditions, branches, and tasks. Assigning properties dynamically allows you to work with properties that might not be present in all dynamically assigned document and record classes.

About this task

Dynamic class assignment works with unrelated document and record classes, but is most effective when all assigned classes inherit from a parent class that defines a common property set, ideally including all mandatory properties. Assigned classes can contain optional, supplementary properties that are populated by using dynamic property mapping.

To make dynamic mapping work in IBM® Content Collector task routes, some prerequisite configuration is required:
  • In IBM FileNet Content Engine, configure your document and record classes. You must do this because IBM Content Collector does not create FileNet P8 classes dynamically but maps only to the existing classes.
  • In IBM Content Collector Configuration Manager, define one or more user-defined metadata sources to contain the values of the dynamically mapped properties. The names of the properties that you define must match the symbolic names of the properties in the FileNet P8 document and record classes, and must have compatible data types.

    Make sure to include collectors or tasks in your task route that populate the user-defined metadata sources, such as a metadata file collector, or the EC Extract Metadata or FSC Associate Metadata tasks.

The following tasks support dynamic mapping:
  • P8 Create Document
  • P8 Create Version Series
  • P8 Declare Record

Procedure

To configure dynamic mapping in one of the listed tasks:

  1. In the Property Mappings section, select the base class that you want to use and configure mappings for the listed properties.
    To assign a property value based on system metadata or to apply an expression to calculate the value, configure the property mapping here.
  2. Click Advanced to open the Advanced Options window for configuring dynamic mappings.
  3. To configure dynamic selection of classes, select Use an expression to determine the class and launch the Expression Editor.
    Configure the expression by using the available prototype expressions. The expression can be as simple as a literal or a metadata reference to extract a property value from a metadata source, or you set up more advanced expressions by using regular expressions, or calculated or conditional values. However, you can also nest expressions to create very complex expressions. For example, the expression can provide the name of the document class as follows:
    • By using the value of a specific property. You could use this option to select a document class based on a message class (such as Memo or Reply) or on a specific element in a .xml metadata file.
    • By concatenating values of multiple properties.
    • By using a conditional expression to choose between literal values or metadata properties (or nested conditional expressions to choose between multiple values). You could use this option for a small set of document classes and simple rules, such as selecting document classes based on document size.
    • By applying a replacement regular expression to extract a value from a metadata property.
    • By using a dynamic metadata reference to perform a lookup in a metadata source or a list. This is a good option if there is a direct relationship between a value in the metadata source and the document class, such as document classes that are assigned by file extension or mime type.
      Remember:

      For list lookups to work, the names of the list items must be regular expressions, not literal values.

    If Content Collector can match the dynamically assigned document class to an existing symbolic FileNet P8 document class when the task route runs, the document is archived to that document class. If the configured expression evaluates to a class that does not exist, the task fails and the error task route is run.
  4. To configure dynamic property mappings, select the user-defined properties that you want to include as part of the input to the task in the Advanced Options window.
    Remember that the property names of the user-defined metadata sources must match the symbolic names of the repository properties and all required properties must be mapped. These dynamic property mappings are always evaluated regardless of what the class name evaluates to. If no matching property is found, Content Collector skips the respective property, and an information message is written to the log file. If one of the listed properties matches a property on the document class that you selected in the Property Mappings section of the main configuration pane, the mapping in the Property Mappings section is used, and the mapping in the Advanced Property Mappings section is ignored.