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.
"doors.ignoreConnectorUI" is used to avoid the writer selection dialog.
Here this dialog is not desired as the writing scope is programmatically set.
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
as described in the snippet in
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
property in such case.
Note: this configuration is not necessary in regular batch mode, when a user is logged in a Windows session.
The model reader can be configured using many options, which are defined in the class
Here is a list of the most significant options:
true, this setting requires additional properties:
Common.PREFERENCE_DOORS_PATH- the full path of
doors.exe, used to launch DOORS
Common.PREFERENCE_DOORS_PORTSERVER- the port and server name of the database to connect to (e.g.
Common.PREFERENCE_DOORS_USER- the name of the DOORS user to make the connection
Common.PREFERENCE_DOORS_PASSWORD- the password of the DOORS user to make the connection
Common.OPTION_IGNORE_CONNECTOR_UIshould also be set
truein such use case.
When a file (e.g. a Word Document) is to be inserted into a DOORS Object and is not already wrapped into an OLE container, the DXL API oleInsert() is used to perform this operation. This API launches the corresponding application (e.g. Word), using OLE Automation, to request the creation of the OLE container. Microsoft Office applications are known to not support this action when running in a non interactive mode (e.g. when launched from a Windows Service). This can lead to unpredictable behavior.
This option allows to declare a comma separated list of file extensions. When a file matching one of those extensions is to be imported, the file will be wrapped into a zip file before being inserted.
AttachmentResolverthat determines the physical location of OLE object files to be written in DOORS. The API
RichTextUtils.createAttachmentResolver(File)provides a default implementation.
Writing DOORS data
Writing images and OLE objects
Top Level Elements