What are Upload Rules?

Upload rules map file name patterns to Dimensions file formats and item types. These rules determine whether files that match a certain file name pattern can be added to the database using a Dimensions client or an IDE. These file name patterns can also restrict a rule to items within a specific project folder. Upload rules must exist in the base database before you can start adding files.

Default upload rules are automatically included when you create a database. The default rules apply to Dimensions clients and each supported IDE. You can modify the default rules, as well as create and modify rules for specific IDE projects and Dimensions CM products.

If you modify the:

- Default rules for Dimensions Clients: The modified rules will be used for all files added to Dimensions CM through the desktop client, the web client, and the Project Merge tool.

- Rules for a specific product for Dimensions Clients: The modified rules will override the default Dimensions CM rules for all files added to Dimensions through the desktop client, the web client, and the Project Merge tool within that product.

- Default rules for an IDE: All subsequent projects created by that IDE in the same base database will use a copy of the new default rules unless there are default product-specific rules for the product to which that project belongs.

- Default product rules for an IDE: All subsequent projects created by that IDE in the specified product will use a copy of the new product-specific default rules.

- Rules for a specific project: The modified rules will be used for all subsequent operations in that project.

Assigning Files of the Same Data Format a Different Item Type

You may want to assign more than one item type for files of the same data format. For example, a team lead wants to have a file to keep notes on the ".project". The file the notes are kept in is a MS Word document and the item type is PN, with a lifecycle of Open and Closed. Other MS Word and .txt documents in the project all have the same item type, DOC, and so the same lifecycle, Draft, Review, and Approved.

When adding a single item to a project or stream the item type can be changed.

When adding multiple files of the same data format but different item type, this can be achieved by using filename pattern matching:

- Make sure the project note files contain the same string in their names, for example, are all named <project>_pn.doc.

- Update the upload rules for the client and product so that the filename pattern, _pn.doc, is assigned the PN item type.

Using Wildcards in Upload Rules

Upload rules support the use of multiple wildcards and Ant style pattern matches in the filenames and paths. Ant patterns help to simplify the organization of separate design part rules. For example, you can define design part rules by a directory pattern match while maintaining the existing item type to file extension mapping. The patterns are similar to those used in DOS and UNIX:

- matches zero or more characters.

- matches zero or more directories.

- matches one character.

Combinations of * and ? are allowed.

Adding an Independent Design Part Rule

You can add an independent design part rule for a specific directory. In the example below, the pattern **/SPEED_SENSOR/** is an independent design part rule and does not define the data format or item type lifecycle as these are not defined in the rule. For the upload to succeed there must be another rule that matches and defines the data format and the item type.

The file SPEED_SENSOR/x3534.exe activates two upload rules:

- This rule defines the design part of the item:

**/SPEED_SENSOR/** SPEED_SENSOR.A;1

- This rule defines the EXE data format and the EXE item type lifecycle:

**/*.exe ; **/*.dll ; **/*.cpl ; **/*.scr **/*10m* EXE EXE

Using Multiple Wildcards in a File Pattern

You can use multiple wildcards in a file pattern. This enables you to specify an upload rule for items that share the middle part of a filename, but have a different beginning and end. For example, abc_s_functionality and xyx_s_morefunctionality have filenames with the same middle part: _s_

An administrator adds a new upload rule specifying the file pattern that contains the middle part of a filename, but starts and ends with wildcard characters. For example:

*_s_*

A developer creates several items where the middle part of the filename is the same. The new upload rule applies to all of the items. Items are created with a common middle part of the filename but with different beginnings and ends.

Combining Multiple Inclusion and Exclusion Patterns

You can combine multiple inclusion and exclusion patterns in a single rule. For example, an administrator changes an existing upload rule and appends another inclusion pattern to match the filename extension expected by the developers. The number of upload rules remains the same. When items are created a rule is activated if there is a match from any pattern from the "Include filename patterns match" list and no matches from any pattern from the "Exclude filename patterns match" list.