SWEM uses a number of configuration files. The control many aspects of the system including business rules, database connections, and EBT system connection information - including FTP/SFTP information. In order to ensure that SWEM is working properly, it is necessary to know about these files and where they can be found.
SWEM configuration is not done using any kind of special tool and requires manual manipulation of XML files. It is important to understand the effects when editing these files. Someone with limited experience or understanding of XML should seek assistance prior to attempting to edit the files.
Because of the nature of these files it is equally important to use a text editor that has the ability to reveal special characters. Any characters included in the file that do not confirm to the UTF-8 character set will corrupt the file. This will cause the services for SWEM to fail to start.
Location: [InstallPath]\Message Processing\CDP.SWEM.MessageProcessing.dll.config
Impacts: Message Processing, FTP communication, EBT Communication, Database Communication, Message Translation, Business Rules
The message processor is the heart of the SWEM solution. The configuration file for this piece is equally critical. It controls the message translations and the implementation of the business rules that are applied at the Middleware processing level. The following breaks down the elements of the file. The file is broken out, as are most .NET configuration files, into multiple sections. In particular the App Settings and Log4net configuration sections are important to SWEM. Only the sections listed in this document should be modified, the others are static system values.
The table below shows the various values for the AppSettings section of the configuration file.
Setting | Definition | Possible Values |
---|---|---|
Mode | The operational mode of the Middleware. | DEV-DEBUG: A special mode reserved for running in a development debugging environment. TEST: A special mode that uses a configuration template to simulate the presence of an EBT system when none is connected. Any value other than the two mentioned here will result in the normal, standard operations of the system. |
ICDVersion | The version of the Interface Control Document to which the system is mapped. | ICD.2014.2.5 |
WICEBTSystemId | The System Id of the WIC EBT system which is passed directly into the EBT system in the form of the receiving institution field in files. | 3: WIC Direct |
Password | The password used when authenticating to the EBT system. | -- REDACTED-- |
LogPath | The file system path to which a log file may be generated for startup issues with the NServiceBus. | C:\Program Files (x86)\SWEM - Server\Logs\Log.txt is the default. Any valid file system path to which the account running the services has access. |
StartDateDiff | A value that indicates the difference between the end date and the start date for certain types of EBT searches, specifically those that need date filtering. Note: This has a very powerful effect on performance of date ranged queries. | 31 is the default, but any integer value is accepted here. |
SupportAPL | A value indicating whether or not Peer Groups are supported in the APL and Vendor files. | 0: False (default) or 1: True |
SWEMUploadScript | A path the file uploader.ps1 file. Note: This has been deprecated since version 1.1.0.8. | C://Program Files (x86)//SWEM - Server//File Processing//Scripts//FileUploader.ps1 is the default. Any valid file system path to which the account running the services has access. |
SWEMInboxName | The path to the location watched by SWEM where it expects to receive files. | C://Program Files (x86)//SWEM - Server//File Processing//Inbox// is the default, but Any valid file system path to which the account running the services has access. |
SWEMOutboxName | The path to the location where SWEM will write files for SPIRIT to pick up, and stage files for transmission to the EBT system. | C://Program Files (x86)//SWEM - Server//File Processing//Outbox// is the default. Any valid file system path to which the account running the services has access. |
SWEMInboxArchiveName | The path to the location where SWEM will archive all files that come into the inbox location. | C://Program Files (x86)//SWEM - Server//File Processing//Archive//Inbox// is the default. Any valid file system path to which the account running the services has access. |
FTPProtocol | The protocol to be used for FTP file transmissions | ftp: Use standard FTP protocol with no security (default) sftp: Use the Secure FTP protocol |
FTPHost | The address of the ftp host server, this should point to a qualified domain name, and not include protocol or port information. It may instead point to an IP address if the domain name is not known or is not valid for some other reason. | ebtdev01.cdpehs.com is an example value. 172.30.105.99 is an example of an IP address value. Any valid FTP server host. |
FTPPort | The port number used for the connection to the FTPHost in the previous setting. | 21 is the default value. Any integer value below 65535 is accepted here. |
FTPUsername | The user name for establishing connection to the FTP host. | -- REDACTED -- |
FTPPassword | The password for establishing connection to the FTP host. | -- REDACTED -- |
FTPSSH-Thumbprint | The thumbprint presented by the SFTP host for authentication. Note: This value is required for SFTP communication. ssh-dss 1024 1b:01:cb:8d:13:ed:b5:01:63:17:d6:da:f3:dc:ce:6c is an example value. | |
FTPInboxName | The location, from the root of the FTP server, where files should be delivered when generated by SWEM. | Inbox is the default value. Any string value is valid here. |
FTPOutboxName | The location, from the root of the FTP server, where files should be retrieved when generated by the EBT system. | Outbox is the default value. Any string value is valid here. |
The log4net section is not so easily defined in a table as the values above. However, it is important to be cognizant of a few specific areas of the configuration. First, the root element contains a level element. This sets the log level for all logging done by the system. This element is explained in documentation provided by Log4Net.
The other important section is the database appender. Again the information provided in the Log4Net documentation can help with understanding this, but the connectionString attribute is of particular importance. This tells log4net what database is the home of the error log records. For all SWEM instances this should be defined as the same database used by the SWEM application for storing messages. Specifically, the connectionString attribute should match the value of the connection strings stored in each of the other configuration components in this document. The default value in this attribute is typically the local machine running SWEM. For example: server=localhost; uid=swemuser; pwd=swempassword; database=swem
It is important to recognize that it is possible to place logging on a different server entirely, so long as this value is consistent in each of the areas that maintain a connection string, then it should be fine to place it wherever is needed.
Location: [InstallPath]\Client Endpoint\CDP.SWEM.WindowsService.exe.config
Impacts: MIS Communication, FTP Communication, Database Communication
Very similar to the Message Processing configuration, the Client Endpoint configuration contains a fairly significant App Settings section, and its own Log4Net section.
Setting | Definition | Possible Values |
---|---|---|
Mode | The operational mode of the Middleware. | DEV-DEBUG: A special mode reserved for running in a development debugging environment. TEST: A special mode that uses a configuration template to simulate the presence of an EBT system when none is connected. * Any value other than the two mentioned above will result in the normal, standard operations of the system. |
TemplateUrl | The path to the template file used by SWEM, this is typically a path to an xml file on the system. | C:\Program Files (x86)\SWEM - Server\Test Mode Template\TestModeTemplate.xml is the default. Any valid file system path to which the account running the services has access. |
SWEMUploadScript | A path the file uploader.ps1 file. Note: This has been deprecated since version 1.1.0.8. | C://Program Files (x86)//SWEM - Server//File Processing//Scripts//FileUploader.ps1 is the default. Any valid file system path to which the account running the services has access. |
SWEMInboxName | The path to the location watched by SWEM where it expects to receive files. | C://Program Files (x86)//SWEM - Server//File Processing//Inbox// is the default. Any valid file system path to which the account running the services has access. |
SWEMOutboxName | The path to the location where SWEM will write files for SPIRIT to pick up, and stage files for transmission to the EBT system. | C://Program Files (x86)//SWEM - Server//File Processing//Outbox// is the default. Any valid file system path to which the account running the services has access. |
SWEMInboxArchiveName | The path to the location where SWEM will archive all files that come into the Inbox location. | C://Program Files (x86)//SWEM - Server//File Processing//Archive//Inbox// is the default. Any valid file system path to which the account running the services has access. |
FTPProtocol | The protocol to be used for FTP file transmissions. | FTP: Use standard FTP protocol with no security (default) SFTP: Use the Secure FTP protocol. |
FTPHost | The address of the FTP host server, this should point to a qualified domain name, and not include protocol or port information. It may instead point to an IP address if the domain name is not known or is not valid for some other reason. | ebtdev01.cdpehs.com is an example value. 172.30.105.99 is an example of an IP address value. Any valid FTP server host name. |
FTPPort | The port number used for the connection to the FTPHost in the previous setting. | 21 is the default value. Any integer value below 65535 is accepted here. |
FTPUsername | The user name for establishing connection to the FTP host. | -- REDACTED -- |
FTPPassword | The password for establishing connection to the FTP host. | -- REDACTED -- |
FTPSSH-Thumbprint | The thumbprint presented by the SFTP host for authentication. Note: This value is required for SFTP communication. | ssh-dss 1024 1b:01:cb:8d:13:ed:b5:01:63:17:d6:da:f3:dc:ce:6c is an example value |
FTPInboxName | The location, from the root of the FTP server, where files should be delivered when generated by SWEM | Inbox is the default value. Any string value is valid here. |
FTPOutboxName | The location, from the root of the FTP server, where files should be retrieved when generated by the EBT system. | Outbox is the default value. Any string value is valid here. |
The log4net section is not so easily defined in a table as the values above. However, it is important to be cognizant of a few specific areas of the configuration. First, the root element contains a level element. This sets the log level for all logging done by the system. This element is explained in documentation provided by Log4Net.
The other important section is the database appender. Again the information provided in the Log4Net documentation can help with understanding this, but the connectionString attribute is of particular importance. This tells log4net what database is the home of the error log records. For all SWEM instances this should be defined as the same database used by the SWEM application for storing messages. Specifically, the connectionString attribute should match the value of the connection strings stored in each of the other configuration components in this document. The default value in this attribute is typically the local machine running SWEM. For example: server=localhost; uid=swemuser; pwd=swempassword; database=swem
It is important to recognize that it is possible to place logging on a different server entirely, so long as this value is consistent in each of the areas that maintain a connection string, then it should be fine to place it wherever is needed.
Location: [InstallPath]\Admin Website\web.config
Impacts: Website functionality, Database Communication (for authentication and message retrieval)
The only particularly significant part of the Admin Website Configuration is contained in two locations, the Connection Strings section and the App Settings section.
Setting | Definition | Possible Values |
---|---|---|
TemplatePath | The path to the template file used by SWEM, this is typically a path to an xml file on the system. | C:\Program Files (x86)\SWEM - Server\Test Mode Template\TestModeTemplate.xml Any valid file system path to which the account running the services has access. |
Agency:ProgramId | The location, from the root of the FTP server, where files should be retrieved when generated by the EBT system. | This should match the Program Id for the connected MIS. Some examples may be MT, MO, ME, C4, etc. Any string value is valid here. |
The only key here is SWEMConnectionString and it is the value needed for communication to the SWEM database. This enables the web application to access the database for retrieving user information as well as logging information and transactional information in SWEM.
Location: [InstallPath]\Message Processing\Infrastructure\GeneratedCode\TransportConnectionString.config
Impacts: SWEM internal communication, Database communication
This file provides two connection strings. One is used by SWEM Message Processing, but is also used by NServiceBus. The other is used by NServiceBus exclusively.
SWEMConnectionString provides support to both, and should be the same connection string as the other components.
NServiceBus/Transport provides support to NServiceBus only and is used as a transportation layer by the software.