Create and Edit Attribute Mappings

In the ReqIF™ file format, a requirement is represented as a SpecObject, which has user-defined attributes. Simulink® Requirements™ enables you to map the attributes of a SpecObject to either built-in or custom attributes of a requirement and to save this mapping as an XML file for future use. With the mapping, you can customize how requirements imported from an external requirements management tool are displayed in Simulink Requirements.

Simulink Requirements provides attribute mappings for ReqIF files from:

  • Polarion REQUIREMENTS™

  • PREEvision

  • IBM® Rational® DOORS®

  • IBM Rational DOORS Next Generation

  • Jama Software

If you want to work with ReqIF files created in a different external requirements management tool, use the Generic attribute mapping from the Source tool drop-down list. If the Generic attribute mapping does not correctly import your requirements, create your own custom attribute mapping .

  1. Open the Requirements Editor and import the ReqIF file by selecting the Blank attribute mapping from the Source tool drop-down list. See Import Requirements from ReqIF Files.

  2. Navigate to the top Import node of the imported requirement set and expand the Attribute Mapping pane on the right.

  3. Map each external attribute in the External Attribute Name column to a built-in or a custom attribute by using the drop-down list in the Mapped To column.

  4. Click Save Mapping. Save the mapping in matlabroot/toolbox/slrequirements/attribute_maps as an XML file.

  5. Restart MATLAB® to include the newly created attribute mapping in the Source tool drop-down list in the Document Import dialog box.

To change the name or description of the attribute mapping, open the XML file that you created in a text editor and modify the values of the <name> and <description> tags.

To have Simulink Requirements select the import attribute mapping based on the tool which originally created the ReqIF file you are importing:

  1. In a text editor, open the attribute mapping and the ReqIF file.

  2. Find the value of the <REQ-IF-TOOL-ID> tag in the ReqIF file.

  3. Change the value of the <name> tag in the attribute mapping file to match the value of the <REQ-IF-TOOL-ID> tag.

Specify Default ReqIF Requirement Type

Some external requirements management tools such as Polarion REQUIREMENTS support multiple types of requirements. In this case, modify the attribute mapping file to specify the default ReqIF requirement type to use when exporting to ReqIF. For example:

<thisType>SpecObject</thisType>
<thisSubType>System Requirement</thisSubType>
The value of the <thisSubType> tag indicates that each exported SpecObject will have the SpecObject type as System Requirement.

Specify ReqIF Template

Some external requirements management tools such as Polarion REQUIREMENTS and IBM Rational DOORS require a specific set of ReqIF data type, attribute, and SpecObject type definitions. They may also require that the ReqIF specification be of a certain type. You can supply these definitions by specifying in the mapping file the name of a template .reqif file produced by the external requirements management tool. During ReqIF export, Simulink Requirements imports the template file and uses it to:

  • Create an instance of the ReqIF data model based on the template with the expected data type, attribute, and SpecObject type definitions.

  • Remap the requirements content to the expected data types and attributes.

Using the template ensures that the exported file can be readily imported into the external requirements management tool.

Save the template files in the same folder as the attribute mapping file (matlabroot/toolbox/slrequirements/attribute_maps). To specify a template file in the attribute mapping, open the attribute mapping file corresponding to the external requirements management tool in a text editor. Modify the value of the <templateFile> tag to match the name of the template file.

See Also

|