Mapping rules

Rational® Synergy uses mapping rules to determine how files and directories must be handled during migrate, when detecting work area conflicts, or when creating objects without a specified Rational Synergy type.
A mapping rule can be used to perform the following tasks:
  • Ignore certain files or directories during migrate or work area conflict detection.
  • Assign a Rational Synergy type during migration or when an object is created without an explicit Rational Synergy type.
  • Assign other properties during migration.

Mapping rules are based on Groovy, an agile and dynamic language for Java™ Virtual Machines. For more information about Groovy, go to http://groovy.codehaus.org. Built-in functions and operators allow simple and commonly used rules to be defined with little knowledge of Groovy.

Mapping rules consist of a condition and an action. The condition can test one or more properties of the object, such as its name, either using an expression using built-in functions, or by in-line Groovy code. The action defines what action must be taken when the condition is true, either using a built-in action, or by in-line Groovy code.

For example,

WHEN %name ~ '.*\\.bin' SET TYPE TO 'binary'

In the previous example, the mapping rules uses a condition that tests the name of the object using a shell pattern match and if the name ends with a ’.bin’ suffix, executes an action that sets the type property to binary.

Most mapping rules can be implemented using conditions that use built-in functions and operators, and using built-in actions. However, for more advanced requirements, conditions and actions can be written using in-line Groovy.

The following topics explain more about mapping rules:


Feedback