Main Content

Export Requirements to ReqIF Files

You can export requirements and links from Requirements Toolbox™ to third-party requirement management tools that support data exchange through the Requirements Interchange Format (ReqIF™) by exporting to ReqIF files. You can choose the properties, stereotype properties, and custom attributes to include in the exported ReqIF file. You can also filter the requirements and links that export by creating a filtered view in the Requirements Editor.

When you export links that point to items that are not in the requirement set, Requirements Toolbox inserts proxy objects in the ReqIF file to prevent the links from breaking.

Choose an Export Mapping

When you export requirements and links to ReqIF files, you must choose an export mapping that maps the requirement and link data to ReqIF requirement and link data. Requirements Toolbox includes export mappings for these third-party tools:

  • IBM® DOORS®

  • IBM DOORS Next

  • Polarion™

  • PREEvision

  • Jama

Requirements Toolbox also includes a generic mapping, which you can use if there is no export mapping for your third-party tool.

Choosing an export mapping is important if you need to do a ReqIF round-trip, which is when you import a ReqIF file, edit the requirements, and export them back to a ReqIF file. When you export requirements during a ReqIF round-trip, you can avoid unexpected behavior by using either:

  • The same mapping for import and export

  • The generic mapping for export

For more information about ReqIF round-trips, see Round-Trip Importing and Exporting for ReqIF Files.

Export Requirement and Link Types

The attribute mapping that you use affects how Requirements Toolbox exports the requirement and link type names to the ReqIF file.

During a ReqIF round-trip, if you re-use the same attribute mapping that you used for the import, the exported ReqIF requirement type names and link type names revert to the values from the original ReqIF file.

When you export a requirement set and its links using the generic mapping, Requirements Toolbox sets the exported requirement and link type name differently depending on if you use a built-in type, a custom requirement type, or a stereotype.

Requirements Toolbox TypeExported ReqIF Type Name

Built-in requirement type:

  • Functional

  • Container

  • Informational

Requirement

Built-in link type:

  • Relate

  • Implement

  • Verify

  • Derive

  • Refine

  • Confirm

  • Relate

  • Implement

  • Verify

  • Derive

  • Refine

  • Confirm

Custom requirement or link type defined in sl_customization file. See Define Custom Requirement and Link Types by Using sl_customization Files.Custom requirement or link type name
Stereotype defined in profile. See Customize Requirements and Links by Using Stereotypes.Stereotype name

Export Requirements

You can export a single requirement set or a single Import node. Additionally, if you authored the requirements in Requirements Toolbox, you can export a single requirement, which also exports its parent and child requirements to maintain the requirement hierarchy.

To export:

  1. In the Requirements Editor, select the requirement set, Import node, or requirement that you want to export.

  2. Click Export > ReqIF.

  3. In the Export Requirement Set to ReqIF dialog, set Export mapping for attributes and types to the attribute mapping for your third-party tool or Generic. For more information, see Choose an Export Mapping.

  4. Under Filter Attributes, use the Add and Remove buttons to specify which properties and custom attributes to include in the ReqIF file.

  5. Under Additional contents to export, select Export links to include links in the exported ReqIF, or clear the selection to omit links. For more information about exporting links, see Export Links.

  6. Output file shows the file path and name for the exported ReqIF file. To edit the file path or name, click Browse and save the file path and name by clicking Save.

  7. Export the ReqIF file by clicking Export.

The Export Requirement dialog with export mapping for attributes and types set to Generic.

Note

Requirements Toolbox does not export link properties, link custom attributes, or link stereotype properties other than the link type name.

To export only the properties and custom attributes in the current Requirements Editor view, select Include attributes from active view columns. For more information about displaying additional columns, see Display Additional Columns.

To export a subset of the requirements and links, create a view that filters based on requirement and link metadata and apply the view in the Requirements Editor. For more information about views, see Configure Views in the Requirements Editor.

Note

If a child requirement meets the filtered view criteria but its parent requirement does not, the Requirements Editor displays the parent requirement to retain the hierarchy. However, when you export the requirements, the ReqIF file does not include the parent requirements that do not meet the filtered criteria.

Programmatically Export Requirements

To programmatically export requirements:

  1. Get the handle to the requirement set by using the slreq.find or slreq.load function.

    For example, this code loads and returns the handle for a requirement set called myReqSet.

    myReqSet = slreq.load("myReqSet");

  2. Create an ExportOptions object and specify the:

    • Name of the exported file

    • Export mapping

    • Option to export links

    • Attributes to export

    For example, this code creates an ExportOptions object that names the exported ReqIF file myReqIF.reqif, uses the generic template, exports links, and only exports the Summary, Type, and Description requirement properties.

    exportOptions = slreq.export.ExportOptions( ...
        OutputFile="myReqIF.reqif",Template="Generic", ...
        IncludeLinks=true,Attributes=["Summary","Type","Description"]);
  3. Export the requirements and links by using the slreq.export function.

    For example, this code exports the requirement set for myReqSet using the export options in exportOptions.

    dir = slreq.export(myReqSet,exportOptions);

To filter the exported requirements and links, create a filtered view by using the create function, then pass the view as an input to the ExportOptions creation function by using the View name-value argument.

Export Links

If your requirements have links, you can export them when you export the requirements to a ReqIF file.

If you link a requirement in Requirements Toolbox to an item that is not contained in the requirement set, such as a Simulink® block or a requirement in a different requirement set, and then export the requirement and associated links to a ReqIF file, Requirements Toolbox inserts a link proxy object into the ReqIF file for the linked item. This table shows the generated link proxy object type name for the linked objects:

Linked ItemLink Proxy Object Type Name

  • Simulink model element

  • Stateflow® model element

  • System Composer™ model element

Simulink Object

Simulink Test™:

  • Test file

  • Test suite

  • Test case

  • Iteration

  • Assessment

Simulink Test Object

MATLAB® code

MATLAB Code Range

Web browser URL

External Resource

Simulink data dictionary entry

Simulink DDEntry

  • Requirement

  • Referenced requirement

Requirements Toolbox Object
All other itemsRequirement

Note

The exported link proxy objects have persistent IDs that the third-party tools can use to avoid duplicating the proxy objects. Duplication may occur if different ReqIF files contain links from the same MATLAB or Simulink object.

If you re-import a ReqIF file to Requirements Toolbox that has link proxy objects, the software reconstructs the links that relate the proxy objects and requirements for proxy objects that have types other than Requirement. For more information, see Import Links from ReqIF Files Generated by Requirements Toolbox.

See Also

Apps

Functions

Objects

Related Topics