Question & Answer
Question
How do you execute the 'Export to DOORS' operation in batch mode under IBM Rational Rhapsody Gateway?
Cause
Execution of operations in batch mode will prevent manual interventions and help to serve the request for a series of services.
Answer
Depending on the IBM Rational Rhapsody Gateway version, you can call the Export to DOORS operation in a batch job.
Since Rhapsody version 7.5, the Export to DOORS feature was modified to be executed independently of the graphical user interface (GUI). However, it requires the export settings to be saved in the Gateway project configuration. You can use the existing synchronisation feature function, eventually with a small modification.
For instance, here is a simple method that allows you to invoke the synchronisation from Rhapsody, without showing the graphical user interface (GUI):
METHOD Application.customSyncFromRhapsody() : { openFromRhapsody; activate; menuRhapsodyDoorsSync; };
You can use a helper definition such as the existing one that calls:
'openFromRhapsodyAndSync'
To test this function, apply the following steps:
- Write one custom_sync.br file in the Gateway\config\otscript directory with the following code:
METHOD Application.customSyncFromRhapsody() : {basicOpenFromRhapsody(TRUE); activate; menuRhapsodyDoorsSync; };
For Rhapsody 8.x and later use:
METHOD Application.customSyncFromRhapsody() : {basicOpenFromRhapsody("FORCE_YES"); activate; menuRhapsodyDoorsSync; };
- Execute this code
- Automatically reply Yes to the "Do you want to reload the UML Model?" question:
Rhapsody 7.x: basicOpenFromRhapsody(TRUE)
Rhapaody 8.x: basicOpenFromRhapsody("FORCE_YES")
- Do not show the synchronise dialogue if it was already configured:
menuRhapsodyDoorsSync
- Alternatively, you can tell Rational Rhapsody Gateway to quit after the synchronisation by executing the below code:
METHOD Application.customSyncFromRhapsody() : {basicOpenFromRhapsody(
TRUE); activate; menuRhapsodyDoorsSync;
kernel.quit; };
- Execute this code from the command line:
"<RhpDir>\Gateway\bin.w32\ddeexecw.exe" rg SYSTEM customSyncFromRhapsody --createprocess --execpath "C:\Rhapsody7511\Gateway\bin.w32\rg.exe" --noddestartup --args -l eng -exec customSyncFromRhapsody
Note: Notice that it uses the program "ddeexecw" to send the command to an existing Rational Rhapsody Gateway process if any; otherwise, it creates a new Rational Rhapsody Gateway process with the specified argument.
- Alternatively, the command can be simplified as follows if you do not need to use an existing Gateway process:
"<RhpDir>\Gateway\bin.w32\rg.exe" -exec customSyncFromRhapsody
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21430486