WEM Configuration

In order to talk about WEM configuration it is important to understand the mechanics of JSON (JavaScript Object Notation) and how it is used to nest configuration information. While the system provides a user interface for manipulating the configuration files, this section is focused on how the various configuration elements are utilized. For more information on the configuration user interface visit the Windows desktop configuration editor.

Configuration Files

WEM consists of a few configuration files, unlike SWEM, these files are all found in one location: *\Configuration*. This location is the WEM Configuration Root and it comprises the following files:

The different WEM components reflect this file in their root paths as well, but the files there are simply symbolic links to the original files found in the configuration root. That is to say, a change to logger.config in the configuration root changes it in the Message Processor, File Processor, Socket Processor, SOAP processor and the web application.

Also, different from SWEM, these files are not overwritten during an installation, so once they are changed they will not be overwritten by an upgrade installation.

logger.config

The logger configuration file configures log4net. This file can be used to tweak the logging mechanics of WEM. This is a standard log4net configuration file, but the logging system is very complex and robust. To get a broader understanding of log4net, visit their manual pages.

For the logger configuration file, there is already a significant amount of documentation online courtesy of Apache Log4Net and their manual pages. Please visit their documentation for all the needed configuration information prior to making any changes to the logger.config file. Note this file contains a connection string and it should be the same connection string used in the shared connection strings file.

Below is a list of the default log levels, in order of verbosity - highest to lowest:

Within the logger.config xml document, there is a root node. By default, it appears as the sample below:

 <root>
    <level value="DEBUG" />
    <appender-ref ref="AdoNetAppender" />
    <appender-ref ref="ColoredConsoleAppender"/>
 </root>

The level can be changed by changing the value for the level element. During a period of about 2 - 4 weeks from the initial setup, WEM should be kept at the DEBUG level. This will allow for the most robust logging verbosity available. However, after that incubation period it is recommended to reduce the level to ERROR to significantly impact the number of log messages transmitted between the WEM software and the backing SQL Server database. Please note, if relying on the logger for email content, this should instead be set to INFO, not ERROR.

shared-connection-strings.config

All the various components use the same connection strings, so rather than breaking those out into the individual application configuration they have all been pooled into this centralized file. Changing a connection string in this file changes it for all of the subcomponents of WEM.

At the time of this writing only a single connection string lives in this document. It is the "DefaultConnection" and should be pointed at the database onto which WEM is being installed. It is important to note that when used in an environment utilizing Distributed Transaction Coordination, that the connection string should contain the "enlist=false" parameter to prevent connectivity issues.

The file should look like the file below.

<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
  <add name="DefaultConnection" connectionString="data source=localhost;initial catalog=wem;integrated security=false;persist security info=True;User ID=wemuser;Password=wemuser;enlist=false" providerName="System.Data.SqlClient" />
</connectionStrings>

*Note: This file doesn't include the connection strings for log4net at this time. A future update is planned that will incorporate logging as well.

shared-settings.config

Like connection strings, there are numerous settings that the application requires. These are global, and were deemed special configuration elements, therefore they are not part of the wem-config.json file. Also like connection strings, a change in this file changes it everywhere.

The shared settings file contains the following configuration elements:

Element Name Data Type Default Comments
log4net.Internal.Debug boolean true Sets a flag that enables log4net to log messages generated by the logger itself. This can be useful when debugging, but is generally not recommend for a production environment.
WaitTimeToReadFile integer 15 The time (in minutes) to allow the lock to be released on an uploaded file before calling it an error due to the file being locked. Once this time out is encountered an exception is logged.
WaitBetweenSFTPXfer integer 30 This is the wait time (in seconds) between unsuccessful SFTP Xfers. The system will reattempt to transfer after waiting for this number of seconds.
NoOfAttemptsSFTPXfer integer 3 This denotes the number of attempts the system will make to upload a file to an SFTP server before giving up.

wem-config-json

This file is the primary configuration file. Most of the configuration changes made after initial installation will be made here. It controls how WEM operates at a very granular level. While this document covers all the files, this file should be considered the most significant file of the set. Like the others, changes here will change it for all the subcomponents.

This file requires a bit more explanation before it is broken out into elements. It is important to understand the structure of the file. At the root, the file contains a collection of agencies, some settings are defined at the agency level. Also defined at the agency level is the collection of EBT Hosts that are in use by the agency, and a collection of MIS Clients used by the agency. In some cases, WEM may need to route files from one or more MIS endpoints to one or more EBT endpoints. This approach allows each of the endpoints for a single agency to be configured separately. This document will now break down the elements at their respective levels.

E-mail Settings

The e-mail settings node of the wem-config.json file holds the information used by the various processing methods to send e-mail messages. Largely this is limited to file processing at this time. E-mail will be generated when an expected file is not generated or when certain errors occur.

Element Name Data Type Default Comments
DefaultCredentials boolean true Some SMTP servers require that the client be authenticated before the server sends e-mail on its behalf. Set this property to true when this SmtpClient object should, if requested by the server, authenticate using the default credentials of the currently logged on user.
DeliveryMethod integer 0 Specifies how outgoing e-mail messages will be handled. 0 = Network, 1=PickupDirectoryFromIis, 2=SpecifiedPickupDirectory
EnableSSL boolean false A flag indicating whether or not SSL is supported on this SMTP host.
FromAddress string empty An e-mail address to show as the sender in a message.
Host string empty This varies per setup and should be configured to the SMTP host.
Password string empty The password for the credentials set for authentication if necessary.
Port integer 23 The port number used for SMTP communication.
UserName string empty This varies per setup and should typically mirror the "From Address" for the e-mail messages.
ToAddresses string[] empty A list of e-mail addresses to which messages should be sent.
GenerateHTMLBody boolean true A flag indicating whether or not to create HTML e-mail body or a raw formatted e-mail body.

Note: If the logger.config is set to INFO or lower logging levels, any email sent by the system will also be logged this also provides a means for organizations that cannot send email using the provided mechanism can still access this information. In particular an entry with the "INFO" level should appear in the ApplicationErrorLogs table, and it should contain the full body of the email.

Agency

The agency node of the wem-config.json file comprises the following elements (in alphabetical order):

Note: There can be multiple agencies at the root node.

Element Name Data Type Default Comments
BIN string (numeric) empty The BIN number used for EBT transactions for the state agency *Note: This is not currently used by WEM but is there for future use.
EBTHosts EBTHost[] empty Defines a collection of EBT Hosts, see EBT Hosts Section for more information.
FileMessageTypes collection empty A collection of objects, representing file information. These objects contain:
      MessageType code which maps to the message type of the file.
      TransType code which maps to the TransactionType in the MIS file's header record.
      FileType string describing the file type.
      FileNameFormat for the EBT version of the file. This should only be defined on outgoing MIS -> EBT files for SPIRIT environments.
      SendEmail flag indicating whether or not this file sends e-mails on delivery issues and certain errors.
MISClients MISClient[] empty Defines a collection of MIS Clients, see MIS Clients Section for more information.
Name string empty A friendly name for the agency displayed in the configuration editor, but not used by the system.
SplitRedemptionQuantity boolean false A value indicating whether or not to split redemptions up over multiple lines when the quantity exceeds 99 for a given redemption line item.
StateIdentifierCode string empty The State Identifier Code as specified in the WIC EBT Technical Implementation Guide (TIG). In SPIRIT this should be an exact match with the WIC Program Id in the EBTCONNECTIONINFO table.
SupportsAPL bool true A value indicating whether or not type information is passed in the vendor and APL files For SPIRIT older than 2.25 this should be set to false, 2.25 and newer it should be true. Note: this will likely be renamed in a future release
WICAuthorityId string (numeric) empty The WIC Authority Id as specified in the WIC EBT Technical Implementation Guide (TIG). In SPIRIT this should be an exact match with the NIT in the EBTCONNECTIONINFO table.

EBT Hosts

The EBTHosts node of the agency node contains the following elements (in alphabetical order):

Note: There can be multiple EBT Hosts defined per agency.

Element Name Data Type Default Comments
ConnectionType integer 1 A flag indicating the connection type used by the FTP Server. 0 = FTP, 1 = SFTP
EnableImpersonation boolean false A flag indicating if impersonation is used when accessing the FTP local and network folders
FileProcessingOutboxArchive string empty A local or network file system folder where outbound (uploaded) files are archived during FTP operations
FTPHostAddress string empty The FQDN or IP Address of the FTP/SFTP host
FTPInboxName string empty The relative path to the Inbox, where files are placed (uploaded) on the FTP server
FTPInboxProxy string empty A local or network file system folder to which inbound FTP downloads are transferred for processing. *Note: Once processed the files are deleted from this location automatically
FTPInboxProxyArchive string empty A local or network file system folder to which inbound FTP downloads are archived. *Note: Once they are processed from the FTPInboxProxy they are archived automatically to this location
FTPMode integer 0 A flag indicating the mode in which the FTP Server operates. 0 = Passive, 1 = Active
FTPOutboxAuxiliaryName string empty A secondary location from which files can be retrieved
FTPOutboxName string empty The relative path to the Outbox, where files are retrieved (downloaded) from the FTP server
FTPPassword string empty The password used to access the FTP Server
FTPPortNumber integer 21 The TCP Port number to use for accessing the FTP Server
FTPRemoveRemoteFiles boolean false A flag indicating whether or not to delete files when an FTP operation completes
FTPSSHThumbprint string (hex) empty The SSH Thumbprint to use when connecting to the SFTP server. This value is required for SFTP connections, and should contain the combination of the algorithm information as well as the MD5 thumbprint. Note: this value must be empty or null for non-secure FTP connections (ex. ssh-dss 1024 1b:01:cb:8d:13:ed:b5:01:63:17:d6:da:f3:dc:ce:6c)
FTPTemporaryArea string empty The location to store temporary FTP files during transfer between the EBT Host and WEM *Note: If the value is empty the temp location will default to the user's temp folder.
FTPUserName string empty The user name portion of the credential set required to access the FTP Server
Id GUID System Generated This is used by the system internally to resolve the different EBT hosts and keep them separate, however most logic decisions are based on the ServiceInstanceName element
ImpersonationPasswordCompare string empty This value is used for validation by the configuration tool. It is not significant other than when adding or updating credentials using the tool.
ImpersonationDomain string empty The domain name of the user account to use for impersonation. *Note: This value is ignored when EnableImpersonation is set to false.
ImpersonationPassword string empty The password of the user account to use for impersonation. *Note: This value is ignored when EnableImpersonation is set to false.
ImpersonationUser string empty The user name of the user account to use for impersonation. *Note: This value is ignored when EnableImpersonation is set to false.
ServiceInstanceName string empty Separates the instances in a human readable / friendly way. This must be unique and is often used for logical decision making within the various WEM components
UniversalServiceEBTHostType integer 0 The EBT host type that represents either a primary system(Online/SWEMQ) or subordinate system (System type used to receive realtime message updates). 0 = Primary, 1 = Subordinate
UniversalServiceICDVersion string "ICD.2014.2.5" The WUMEI ICD Version implemented for the connection to the EBT host
UniversalServiceNamespaceTranslation string empty Used to modify outbound EBT request message (ex. Default value for S3 http://service.solutran.com/eWIC/2)
UniversalServiceIsSWEMSC boolean false

Used to determine if the current EBT configuration is setup for SWEM-SC smart card communication mode.

NOTE: Functionality introduced in 2.5.0.6: If the value is true and the benefit start date will be modified by setting the benefit start date to the first day of the month. If the value is false, the change will not be applied. SPECIAL NOTE: This deprecates the business logic introduced in 2.5.0.5.

UniversalServiceOverrideTerminationDate boolean false Used to determine if the vendor termination date will be alter to use the system's current date when processing of the file occurred.
UniversalServicePassword string empty The password to pass as the MIS Password to the EBT host
UniversalServiceProviderType integer 1 Indicates the provider of the EBT Services. Supported Providers: 0 = WUMEI(Generic), 1 = WIC Direct (CDP), 2 = S3 (Solutran Online), 3 = Reserved for EPPIC (Xerox)
UniversalServiceTransmitConfirmMessageOnlyOnSuccess boolean false Used to determine whether to transfer the smart card confirm message only if the original request was successful.
UniversalServiceTransmitSecondaryOnlyOnSuccess boolean true Used to determine whether the smart card message will be transmitted to the offline system only if the primary system request was successful.
UniversalServiceURL string empty The URL for accessing the universal interface service exposed by the EBT Host
UniversalServiceUsername string empty The user name to pass as the MIS Username to the EBT host
UniversalServiceWICEBTSystemID string empty The system of the EBT Host itself as known by the EBT Host used primarily in the originator/destination fields
UniversalServiceWICStateAgencyID string empty The agency ID for the WIC Agency as known to the EBT Host *Note: this can be different from how it is known to the MIS, for example an SEBT program may be 849 but the EBT Host still sees it as 049
UniversalServiceWorkingKey string 0 Value provided by the EBT host for the working key
UniversalServiceStartDateDiff integer 0 For searches against the EBT environment, this represents the number of days prior to search
UniversalServiceSystemType integer 0 Indicates the type of EBT system. 0 = OnlineSystem, 1 = OfflineSystem
IdentityUrl string empty Value provided by the EBT system that represents the service location for authorization requests.
ClientId string empty Value provided by the EBT system that stores the client id of the authorization token.
Secret string empty Value provided by the EBT system that stores the secret of the authorization token.
UI2020Url string empty Value provided by the EBT system that represents the 2020 endpoint for EBT message processing.
Installation string EBT Value provided by the EBT system that represents the installation of the 2020 endpoint for EBT message processing.

MIS Clients

The MISClients node of the agency node contains the following elements (in alphabetical order):

Note: There can be multiple MIS Clients defined per agency.

Element Name Data Type Default Comments
AccountBalanceRequestWindow integer 4 The number of months to search to get the account balance. For example: The message takes the assumption that the account balance start window will be today's date. The AccountBalanceRequestWindows will add the x number of months to the end date portion of the range. Start Date = Today's Date -- End Date = Today's Date + AccountBalanceRequestWindows
AccountSetupMessageActive boolean true A value indicating if account setup messages are active in the host
BenefitTransactionMessageActive boolean true A value indicating whether or not benefit transfer messages are active in the host
BenefitType string WIC WEM supports multiple legacy interfaces. The specification for the two currently implemented interfaces has a BenefitType field, with a mandatory value of "WIC". However, SPIRIT does not conform to this requirement. This value indicates the allowed value for this field.
CardHistoryActionDateTimeFormat string yyyyMMdd The format string to apply to the Card History Action Date field.
CardHistoryMessageActive boolean true A value indicating whether or not card history messages are active in the host.
CardPresentMessageActive boolean true A value indicating whether or not card present messages are active in the host.
CardRecipientMessageActive boolean true A value indicating whether or not card recipient messages are active in the host.
ClientEndpointName string empty A REQUIRED value that indicates a common name by which the MIS client can be identified in a human readable way.
ConfirmSmartCardUpdateMessageActive boolean true A value indicating whether or not confirm smart card update messages are active in the host.
DateTimeTransmissionFormat string yyyyMMddHHmmssFFF The format string to apply to the transmission date time field.
DOBDateFormat string yyyyMMdd The format string to apply to the DOB field.
EnableImpersonation boolean false A flag indicating whether or not impersonation is used when accessing the FTP local and network folders.
FileProcessingInbox string empty A local or network file system folder to which MIS files are transferred for processing (MIS files being sent to the Middleware for conversion to EBT format files). *Note: Once processed the files are deleted from this location automatically
FileProcessingInboxArchive string empty A local or network file system folder to which files are archived as they are transferred from the Inbox.
FileProcessingOutbox string empty A local or network file system folder from which MIS files are transferred for processing (EBT files that have been converted by the Middleware into the MIS format). *Note: Once processed the files are deleted from this location automatically
FileProcessingOutboxArchive string empty A local or network file system folder to which files are archived as they are placed into the Outbox.
HonorDaylightSavingsTimeAdjustment boolean true A flag indicating whether or not the Middleware should honor DST in time manipulation.
Id GUID System Generated This is used by the system internally to resolve the different MIS clients and keep them separate, however most logic decisions are based on the ServiceInstanceName element.
ImpersonationDomain string empty The domain name of the user account to use for impersonation. Note: This value is ignored when EnableImpersonation is set to false.
ImpersonationPassword string empty The password of the user account to use for impersonation. Note: This value is ignored when EnableImpersonation is set to false.
ImpersonationPasswordCompare string empty This value is used for validation by the configuration tool. It is not significant other than when adding or updating credentials using the tool.
ImpersonationUser string empty The user name of the user account to use for impersonation. Note: This value is ignored when EnableImpersonation is set to false.
IssuanceNumberType string W The EBT Specification implemented in both SPIRIT and the Open Domain MIS indicates the "Unique Benefit Issuance Number" must start with 'W'. However, SPIRIT does not implement this correctly. This configuration value aids in the validation of this field.
MaximumBenefitCount integer 30 In some fixed length driven EBT systems due to the fact they are fixed length structures, there is a finite capacity on the maximum number of benefits submitted and returned. This value provides the ability to validate the quantity of benefit issuances in a transaction.
MaximumIssuanceNumberDigits integer 15 The largest number of digits that can be used for an issuance number.
MaximumNumberOfReturnedHistoryRows integer 60 A value indicating the maximum number of rows to return in a call to history methods
MISProviderType integer 1 A value indicating the type of MIS that is connected. 0 = Open Domain, 1 = SPIRIT, 2 = SPIRIT Web.

Note

NOTE: For SPIRIT Web batch processing pass-through support, this value should be set to 2.

MISSystemType integer 0 A value indicating the type of MIS system currently either a primary system(State) or an alternate(Summer EBT). 0 = Primary, 2 = Alternate
OperationalTimeZone string SERVER-DERIVED A string indicating the time zone to operate in for this MIS. This is intended for a scenario where an MIS is used in a different time zone. All valid US time zones are supported.
ProfileNumber string null A value containing routing information for the system to use regarding this agency.
RedemptionDateFormat string MM/dd/yyyy The format string to apply to the Redemption Date field.
RedemptionTimeFormat string h:mm:ss tt The format string to apply to the Redemption Time field.
RedemptionHistoryMessageActive boolean true A value indicating whether or not redemption history messages are active in the host.
ReportDamagedCardMessageActive boolean true A value indicating whether or not report damaged card messages are active in the host.
ResetBadPinCountMessageActive boolean true A value indicating whether or not reset bad pin count messages are active in the host.
StandardDateFormat string yyyyMMdd The format string to apply to standard date fields.
StandardTimeFormat string hhmmssfff The format string to apply to standard time fields.
UseEnhancedCardstatus boolean false A value indicating whether the enhanced card status methods are used. *NOTE This should be set to true for SPIRIT 2.28 or greater.
WICAccountBalanceMessageActive boolean true A value indicating whether or not account balance messages are active in the host.
WICBenefitHistoryMessageActive boolean true A value indicating whether or not benefit history messages are active in the host.
WebProcessingAllowCookies boolean false A value indicating whether or not cookies are allowed with the service.
WebProcessingBypassProxyOnLocal boolean true A value indicating whether or not local proxy bypass is enabled.
WebProcessingClientCredentialType integer 0 The credential type used for clients connecting to this host. 0 = None, 1 = Basic, 2 = Digest, 3 = NTLM, 4 = Windows, 5 = Certificate, 6 = Inherited from host
WebProcessingCloseTimeout timespan 00:01:00 The TimeSpan that specifies how long the close operation has to complete before timing out.
WebProcessingEnabled boolean true A value indicating whether or not web processing is enabled for this instance.
WebProcessingHostAddress string http://localhost/[optional-instance The address for incoming SOAP messages to be routed by the MIS. An instance is required if IIS is running on the machine as well.
      If running multiple agencies, this can be handled by instancing this URL such as http://localhost/[Agency] where [Agency] is a string representing an agency such as the Program Identifier in SPIRIT.
      This can also be used for setting up test instances for multiple environments. For example, assume agency CDP has a testing, regression, staging, environment. These could all be routed through a single WEM instance using instanced addresses -- i.e. http://localhost/testing, http://localhost/regression, http://localhost/staging
      Important Note when configuring the MIS any of these addresses should be represented as the address specified here + "/MessageService". This is because WEM hosts a MessageService as well as a CardService for smart card. So, using the testing instance above the test instance of SPIRIT should have its SOAP URI set to http://localhost/testing/MessageService
WebProcessingHostNameComparisonMode integer 0 Specifies how the host name should be used in URI comparisons when dispatching an incoming message to a service endpoint. 0 = Strong Wildcard, 1 = Exact, 2 = Weak Wildcard
WebProcessingIncludeExceptionDetailInFaults boolean true A value indicating whether or not soap faults will reveal .net exception information.
WebProcessingMaxBufferPoolSize integer 524288 Sets the maximum size of the buffer pool for an endpoint.
WebProcessingMaxBufferSize integer 65536 Sets the maximum size of a buffer that stores messages while they are processed for an endpoint.
WebProcessingMaxReceivedMessageSize integer 65536 The maximum size of the messages that can be received on the wire by the host.
WebProcessingMessageEncoding integer 0 Specifies the message encoding method for messages. 0 = Text, 1 = Mtom
WebProcessingOpenTimeout timespan 00:01:00 The TimeSpan that specifies how long the open operation has to complete before timing out.
WebProcessingReceiveTimeout timespan 00:10:00 The TimeSpan that specifies how long the receive operation has to complete before timing out.
WebProcessingSendTimeout timespan 00:01:00 The TimeSpan that specifies how long the send operation has to complete before timing out.
WebProcessingTextEncoding integer 4 The text encoding to use for the web processing endpoint. 0 = Ascii, 1 = Unicode, 2 = UTF-7, 3 = UTF-8, 4 = UTF-16, 5 = UTF-32 For SPIRIT this must be set to UTF-16
WebProcessingTransferMode integer 0 The transfer mode used by the web processing endpoint. 0 = Buffered, 1 = Streamed, 2 = StreamedRequest, 3 = StreamedResponse
WebProcessingUseDefaultWebProxy boolean true A value indicating whether or not the default web proxy should be used.
WebProcessingUseLegacySOAPAlias boolean true A value indicating the SOAP aliasing mode to use. Legacy or Modern. For SPIRIT this should be set to true
WebProcessingWSDLEnabled boolean true A value indicating whether or not a web service descriptor is enabled for this instance.
WICMISSystemID string empty The system ID to pass as the MISSystemId to the EBT host