Benchmark Niche Windows Service
Developer Reference Guide
Overview
A Windows service that interfaces with a Niche environment through an NDS service instance. NDS is effectively a wrapper for the associated Niche database that accepts special Niche “Application SQL” to process requests.
Solution
$/Court/Dev/Dev/source/Service/Benchmark.Niche/Benchmark.Niche.sln
Main Project
Benchmark.Niche.WindowsService
Deployment Project
BenchmarkNichePushService
Build Repository
\\ptg-server1\Software\Downloads\Product\Benchmark\Services\Niche
Logging
Logs to tblServiceLog with ServiceName “Niche Service”.
May log to the Event Log on the hosting machine for errors that do not make it to the database.
select top 100 * from tblServiceLog (nolock)
where ServiceName = 'Niche Service'
order by ServiceLogID desc
Configurable Queries
Several queries used by the Benchmark Niche Service against NDS are configurable through associated tblQuery records in the Benchmark database. These records have a QueryType value set to “Niche”. These queries are mostly related to the “Charging Document” related functionality of the service.
Original Integration Documentation
The path below contains the reference material we received from the customer to work on the integration.
\\ptg-server1\Software\Benchmark\ThirdPartyInterfaceDocumentation\Niche Documentation\NicheExternalInterfacesAPI\NicheExternalInterfacesAPI
The “Developing for the Niche Platform” document is very informative and has a lot of content related to the Niche environment, related entities, application SQL, and more.
The “NDSAnalyzer” application can be run against an NDS instance as a handy tool to run queries on demand against the configured Niche environment.
The “NMLView” application provides a reference of Niche related entities and their associations to other records. The application provides various references and descriptions for entity table details, pseudo columns, relationships, and applicable data value choices for applicable fields.
Note that the “NMLView” application we were delivered does not always have the fields or choice lists available from Wichita. We appear to have been given an older version and were never provided any updates.
Building and Packaging a Release
None of the Benchmark Windows services are being built by the build server due to complications with the setup project being used there. Follow the directions below to prepare, build, and package a Benchmark Niche Service release.
Update the Service and Installer Versions
Update the Service’s Assembly Info Version
Locate the “AssemblyInfo.cs” files in the “Properties” folder of the “Benchmark.Niche.WindowsService” and “Benchmark.Niche” projects. I have been keeping the versions of the service and this helper library in sync.
Open the “AssemblyInfo.cs” files for editing.
It is a good idea to check that the copyright company and year in the file are current when you’re updating for a forthcoming build. If necessary, update the company and copyright details.
Locate the “AssemblyVersion” and “AssemblyFileVersion” fields at the end of each “AssemblyInfo” file being updated and set the version as appropriate. Remember that with our Windows services, we’re leaving the “Revision” field as “0” as the installer will only reflect three levels of version identification.
Update the Setup Project Version
Locate the “BenchmarkNichePushService” setup project.
Right-click on the project and select the “Check Out for Edit…” option from the menu. The setup project will not allow you to update the version information without checking out the project first. Visual Studio will complain.
With “BenchmarkNichePushService” still selected in the Solution menu, click on the “Properties” tab at the bottom of the “Solution Explorer” panel.
The Properties panel should update and look like the following screenshot.
In the listed properties, locate and update the “Version” value to the desired value.
Visual Studio will prompt you asking if you would like to update the “ProductCode” automatically too. Agree to update the “ProductCode” value, which Visual Studio will update to a new GUID value.
Be sure to check in your version update changes.
Building the Release
Be sure that the build mode in Visual Studio is set to “Release”.
Locate the “BenchmarkNichePushService” setup project.
Right-click on the project and select the “Build” option from the menu.
After the build completes and packages successfully, right-click on the project again and select the “Open Folder in File Explorer” option.
Open the “Release” folder.
The “Release” folder will contain the .msi and setup.exe files to be packaged in the service release.
Packaging the Release
Navigate to the build repository or “Downloads” folder for Niche releases.
\\ptg-server1\Software\Downloads\Product\Benchmark\Services\Niche
It’s usually easiest to start by making a copy of the most recent release to use as a template.
Package the Service Release Files
Within the release folder, we’ll include the .msi and setup.exe files in a “ServiceRelease” folder.
Place the updated .msi and setup.exe files in this “ServiceRelease” folder.
Package Scripts for the Release
Within the release folder, we have a “Scripts” folder that contains script updates as necessary. Some scripts in the current package include Wichita, KS changes from testing and implementing there.