Although there is a published API for Gateway - it doesn't expose all of the functions that it's capable of - so it's easier to use Gateway's own scripting language.
For example create a (text) file with a .br extension (doesn't matter what you call it) in the Gateway\config\otscript directory:
(Example files are also attached:
Attachment:
File comment: example files for invoking a batch Rhapsody-Doors sync
CustomSyncDoorsRhapsody.zip [653 Bytes]
Downloaded 36 times
)
METHOD Application.customRhpDoorsSync() : {
basicOpenFromRhapsody(TRUE); activate; menuRhapsodyDoorsSync; kernel.quit;
};
This defines a new function that you can call from your script.
The function basically does 3 things:
1. Opens gateway (it assumes Rhapsody is already running) and automatically answers Yes to the 'do you want to reload' question.
2. Activates the same function that would have been activated had you as a user right-clicked in Rhapsody and selected Sync with DOORS - and do not show the synchronize dialog if it has already been configured
3. Quits
You can then invoke the function in your script by calling:
<RhpDir>\Gateway\bin.w32\rg.exe" -exec customRhpDoorsSync
Note that this still invokes the Gateway User Interface - in 7.52 there will be a batch mode whereby you can invoke these functions without invoking the UI
Cheers
Andy