The Database Connector continuously observes a table in a database and can:
- Create new specifications
- Modify existing specifications
To modify an existing specification:
Use the binding type Specification Id Field or Specification Name Field (see below) to select the specification to be modified.
The Operation Name Field can be used to perform an operation on the specification.
Connectors send information into Constants or Controls of a specification by name. Connectors will observe the following behavior when driving data into a specification:
- If the constant name is found with the same name as the name of the value being applied, then the constant will be driven.
- If there is a control with the same name as the constant, the control will NOT have its value set.
- If however there is no constant with that name, but there is a control with that name, the controls value will be set.
The Database Connector requires a valid database to monitor.
The Table in the database must include a field for the Connector to read and write the Status of the entry.
Setup the Data Source
The following settings are applied in the Data Source section of the settings screen.
- Type - Specifies the type of database to be observed. The available options are:
- SQL Server - Connects directly to a SQL Server database.
- ODBC - Connects to a database through an ODBC connection. Information on creating ODBC connections can be found at the following links:
- Server Address (When Type is SQL Server) - The Connector will list all SQL Servers that the computer can see. Select the required server from the drop down.
Source (When Type is ODBC) - The Connector will list all ODBC connections set up on the computer. Select the required source from the drop down.
- Username - Enter a valid username to connect to the data source.
- Password - Enter a valid password for the username.
- Is Trusted Connection (When Type is SQL Server) - Check if the data source requires a trusted connection.
- Database (When Type is SQL Server) - Select the required SQl database to monitor.
- Table Name - Select the table name to monitor.
Once connected to a database and table (from the settings above) the fields from the table are read into the Field Bindings section and are listed in the Name column.
Set a binding Type for each field. The available bindings are:
- No Binding - DriveWorks will ignore any fields mapped to this binding type.
- ID Field (mandatory) - Used to mark a field type as an Identity Field.
- Specification Name Field - Used to select an existing specification to be edited.
The binding Specification Id Field can also be used. If both are used Specification Id will take preference.
- Specification Id Field - Used to select an existing specification to be edited.
The binding Specification Name Field can also be used. If both are used Specification Id will take preference.
We recommend the data type of this field, in the database, to be set to a nvarchar()
We have found that using a data type of Int will cause the connector to fail.
- Input Field - DriveWorks will pass the value in this field to a Constant or Control Name in the project.
- Process State Field (mandatory)
The database must contain a field that DriveWorks can use to detect if a specification requires processing. The same field will be updated by DriveWorks to report its current status.
- Process Value - Is the value that will allow the Connector to recognize if a record needs to be processed. The default value is set to New.
- Processing Value - Is the value to be written into the field when the Connector is processing the record. The default value is set to Processing
- Success Value - Is the value to be written into the field when the Connector has successfully processed the record. The default value is set to Complete
- Failed Value - Is the value to be written into the field if the Connector failed to process the record. The default value is set to Failed
- Project Name Field* - Is the name of a valid project in the Group the data is to be applied to.
- Transition Name Field* - Is the name of a valid Transition (as created in Specification Flow) that will be run once the data has been passed to the new specification.
- Operation Name Field** - Is the name of a valid Operation (as created in Specification Flow) that will be run once the data has been passed to the existing specification.
When the table has no field for Project Name or Transition Name, these bindings must be set in the Additional Options (see below).
Operations can only be performed on existing specifications.
The following additional options are available:
- Project Name - Use when only a single project can be processed by the connector and no field binding exists for this property.
- Transition Names - Use when only a single project can be processed by the connector and no field binding exists for this property.
- Scan Interval - Set how often (in seconds) the connector will scan for new entries in the database.