Batch Mode Automatization

ReqEdit Online Documentation

Batch Mode Automatization

5 min read
last updated: 10/26/2021

ReqEdit can be used without GUI in a command line to import or export ReqIF files.

Batch mode functionality:

Examples

Import from a RIF11a to a ReqIF file

ReqEdit.exe -batch -in "D:\Workplace\Input Folder\requirements.zip" -out "D:\Workplace\Output Folder" -mapping "D:\ Workplace\RifToReqif.txt" -jobid "001" -logfile "D:\Workplace\Log.txt"

Export from a ReqIF to a RIF11a file

ReqEdit.exe -batch -in "D:\Workplace\Input Folder\requirements.reqifz" -out "D:\Workplace\Output Folder" -mapping "D:\ Workplace\ReqifToRif.txt" -jobid "002" -outtype RIF11a -logfile "D:\Workplace\Log.txt"

Export from a ReqIF to a REQIF DNG file (obsolete)

ReqEdit.exe -batch -in "D:\Workplace\Input Folder\requirements.reqifz" -out "D:\Workplace\Output Folder" -jobid "003" -outtype REQIFDNG -logfile "D:\Workplace\Log.txt"

Import from a Word .docx to a ReqIF file

ReqEdit.exe -batch -in "D:\Workplace\Input Folder\requirements.docx" -out "D:\Workplace\Output Folder" -mapping "D:\ Workplace\WordToReqif.txt" -jobid "004" -logfile "D:\Workplace\Log.txt" –keephierarchy     -removechapternumberings –tables –attachments –images    -attributetable row

Import from REQXML to ReqIF file, read more here: REQXML format

ReqEdit.exe -batch -in "D:\Workplace\Input Folder\requirements.reqxml" 
-out "D:\Workplace\Output Folder" -jobid "003" 
-mapping "D:\ Workplace\ReqXmltoReqIF.txt" -logfile "D:\Workplace\Log.txt"

Parameters

General batch parameters

-batchmandatory
enable batch mode without displaying GUI
-inmandatory
indicates the input file
-outmandatory
indicates the output folder
-mappingoptional
used only for ReqIF~RIF conversions
if a mapping is not specified, the default mapping of the system attributes is used
-jobidoptional
sets a custom prefix for the output file
if not set, the output file will have a datetime prefix
-logfileoptional
indicate the absolute path to the user desired logfile
if the logfile already exists, the new information will be appended
if not specified, the logs will be written to the standard ReqEdit log

ReqIF and RIF import/export parameters

-outtypeindicate the output type
possible values are “RIF11a”, “REQIF” or “REQIFDNG” for Rational DOORS Next Generation compatible files

Word import parameters

-keephierarchyoptional
will recreate the parent/child hierarchy in the Word file based on Heading levels. If not enabled, all Headings will be displayed on the first level
-removechapternumberingsoptional
removes manual chapter numberings  
-tablesoptional
all tables will be converted to a ReqIF compatible (HTML) table, else all tables in the file will be ignored
-attachmentsoptional
embedded objects (Word (rtf, doc, docx), Excel (xls, xlsx), Powerpoint (ppt, pptx)) in the Word document will be imported to ReqIFz file and referenced inside the ReqIF object, else all objects in the Word file will be ignored
-imagesoptional
embedded images (JPG, PNG, BMP) in the Word document will be imported to ReqIFz file and referenced inside the ReqIF object, else all images in the Word file will be ignored
-attributetableoptional
possible values “row” or “column”
the word document parser will look in the first row/column of all tables for the values given in the mapping file to assert if the table should be treated as an attribute table

NOTE: Parameter values which contain empty spaces or special characters like slash, backslash and others, need to be written between quotes

Mapping file

The mapping files are used to translate attribute names from RIF to ReqIF standard and vice-versa. The mapping file is a simple .txt file with the format shown below in two examples with IBM DOORS system attribute names and two custom attributes displayed with red text.

Example of a RifToReqif mapping file

Absolute Number - ReqIF.ForeignID
Created By - ReqIF.ForeignCreatedBy
Created On - ReqIF.ForeignCreatedOn
Created Thru - ReqIF.ForeignCreatedThru
Last Modified By - ReqIF.ForeignModifiedBy
Object Heading - ReqIF.ChapterName
Object Number - ReqIF.ChapterNumber
Object Short Text - ReqIF.Name
Object Text - ReqIF.Text
Description - ReqIF.Description
Customer_Description - Supplier_Description
Customer_Status - Supplier_Status

Example of a ReqifToRif mapping file

ReqIF.ForeignID - Absolute Number
ReqIF.ForeignCreatedBy - Created By
ReqIF.ForeignCreatedOn - Created On
ReqIF.ForeignCreatedThru - Created Thru
ReqIF.ForeignModifiedBy - Last Modified By
ReqIF.ChapterName - Object Heading
ReqIF.ChapterNumber - Object Number
ReqIF.Name - Object Short Text
ReqIF.Text - Object Text
ReqIF.Description - Description
Supplier_Description - Customer_Description
Supplier_Status - Customer_Status

Example of a WordToReqif mapping file

ID            | ReqIF.ForeignID   | integer
Heading       | ReqIF.ChapterName | text
Text          | ReqIF.Text        | text
Customer_Desc | Supplier_Descr    | text
Release Date  | Release Date      | date: dd.MM.yyyy 
Price         | Price             | real: .

Example of a REQXML to ReqIF mapping file

Last Modified By - ReqIF.ForeignModifiedBy
Object Heading - ReqIF.ChapterName
Object Number - ReqIF.ChapterNumber
Object Short Text - ReqIF.Name
Object Text - ReqIF.Text
Customer_Description - Supplier_Description
Customer_Status - Supplier_Status

REQXML

This is a simplified custom XML format to speed up data exchange to ReqIF format. Read here the REQXML documentation.

Output files

If the target type is ReqIF or ReqIF DNG, there will be only one output file (reqif or reqifz)

If the target type is single Spec RIF, there will be only one output file (xml or zip)

If the target type is multi Spec RIF, there will be one output file for each Specification (xml or zip); the file names will contain the names of the specifications

Logging

For each batch operation, an entry will be added to the logfile. Each entry will contain the date and time of the operation, the input and output file(s) path and names, the output file(s) type and the job ID.

If an error occurs during the operation, the report will include an exit code and message. You can see the complete list of exit codes and messages below.

General Exit Codes

5Batch Feature ID is missing
10Error during Conversion
20Mandatory Parameter “batch” is missing
21Mandatory Parameter “in” is missing
22Mandatory Parameter “out” is missing
23Invalid output type value
24Job id can not be empty
25Has invalid parameter
26Incompatible output type value


Input File Related Exit Codes      

110Input File is not readable or does not exist
120Input File has not defined type (Autodetection fails)
130Input File is not valid (Schema validation fails)


Output File Related Exit Codes
   

210Not enough space in output folder (3*size of input file required to be free)
220Outputfolder is not writable
240Output folder does not exist


Mapping File Related Exit Codes 
           

310Mapping file does not exist or is not readable
320Mapping file has wrong format


Log File Related Exit Codes          

410Access denied; Cannot create not existing log file on creation mode
411Access denied; Cannot write to existing log file on update mode