Programming the Writer Configuration

Important Note: Writing data in DOORS is a non trivial task when it comes to determine exactly what should be written and how, notably when an update of existing data is to be performed.
Rather than using the model writer, you are now strongly encouraged to use the commands framework, which allows a Java programmer to control the update of DOORS data with fine grained interactions.

When the writer is launched from rules or Java code, you can set options to tweak the writer's behavior.

    import com.sodius.mdw.metamodel.doors.connectors.dxl.*;
    ...
    Map options = new HashMap();
    options.put("doors.ignoreConnectorUI", Boolean.TRUE);
    options.put("mdw.doors.dxl.top_level_elements", "/MyFolder");
    
    Model doorsModel =...
    doorsModel.write("Application", null, options);

In this example, we ask to write the folder "MyFolder", and all its content, at the root of the DOORS database.

The option "doors.ignoreConnectorUI" is used to avoid the writer selection dialog. Here this dialog is not desired as the writing scope is programmatically set.

Connecting to DOORS in batch mode

The writer usually requires a DOORS client to be open in order to writer the data. It is possible to configure the writer so that DOORS is executed in batch mode, provided you give the writer the DOORS user identity to connect to. To use the batch mode, you need to set the Common.PREFERENCE_DOORS_IS_SILENT property, as described in the snippet in DoorsReader.

Connecting to DOORS in non-interactive mode

When running DOORS in a non-interactive mode, like from a Windows Scheduled Task or a Windows Service, some files cannot be imported as is into DOORS. You are strongly encouraged to set the Common.OPTION_ZIP_FILE_EXTENSIONS property in such case.
Note: this configuration is not necessary in regular batch mode, when a user is logged in a Windows session.

Programmatic Properties

The model reader can be configured using many options, which are defined in the class Common.

Here is a list of the most significant options:

Related reference
Writing DOORS data
Writing images and OLE objects
Writer Modes
Top Level Elements