The following steps are necessary to set up deployable services and order Integration between DMSi Agility and DRTrack.
CONTENTS
- Deploy Services
- Create DRTrack Branches
- Install .NET Core Hosting Bundle
- Create App Pool in IIS
- Create Applications in IIS
- Deploy Services
- Configure Services
- Known Issues
- Troubleshooting
Deploy Services
The following three services must be deployed and configured to IIS:
- Order Integration Service − The service starts the sync process on a configurable interval for one or more integrations, and communication with the DRTrack Order Import Service occurs to add, modify, or delete DRTrack Orders.
- DRTrack Query Service − The Order Integration Service sends requests for DRTrack orders during sync processing.
- DMSi Agility Query Service − The Order Integration Service requests DMSi Agility Shipments from the provided Agility Web Services during sync processing.
Upon deployment of the required services, the following steps to set up DMSi Agility for integration with DRTrack must be completed:
- Create branches in DRTrack with BranchIDs matching Agility. This allows for the Order Integration Service to create the accounts using the same branch as Agility instead of the default (MAIN) branch.
- Install .NET Core Hosting Bundle
- Create App Pools in IIS
- Create applications in IIS
- Deploy services
- Configure services
Create DRTrack Branches
The Order Import Service does not create branches. In order for unsynchronized Agility accounts to be created in the correct DRTrack branch, a DRT branch with the ID matching the BranchID from Agility must be manually created prior to importing orders for that account. The details of this step are described in the DRTrack User Guide.
Install .NET Core Hosting Bundle
Download the .NET Core Hosting Bundle (https://www.microsoft.com/net/download/dotnet-core/runtime-2.0.6) and install on the server. The installer is called "hosting bundle installer" under the Windows category. An IIS restart is required after installation.
Create App Pool in IIS
ASP.NET Core runs in a separate process and manages the runtime. ASP.NET Core doesn't rely on loading the desktop CLR. Setting the .NET CLR version to No Managed Code is recommended.
- Create a new application pool and make sure that "No Managed Code" is selected.
2. As seen below, set the Application Pool's 'Idle Time-out (minutes)' in Advanced Settings to 0 to keep the Order Integration Service alive.
Create Applications in IIS
- Create a folder on the disk for each service to be installed.
- In IIS Manager, create a new application.
- Set the site name.
- For physical path, select the folder created in previous step.
- Select the Application pool that was created.
- Leave Bindings to their default values and set the Host name to the same as the site name.
- Repeat steps 2 through 6 for the additional services.
Deploy Services
- Copy the contents of each service ZIP file to a unique folder location.
- Rename the
web.config.standard
file toweb.config
if this is a new deployment and not an update.
Configure Services
Each service deployment archive contains an appsettings.json.
After updating any of the settings, be sure to restart the site in IIS Manager.
Note on URLs: Be sure to include the full URL including the correct protocol. We have seen Order Imports from the Order Integration Service get added with an empty string (instead of XML) for the data when the protocol was not HTTPS.
Order Integration Service
(example: appsettings.json)
ExternalSourceURL | URL to DMSi Agility Query Service. Example: http://dmsiQuery.my.DRTrackSite.com/api/DmsiQueryService |
DRTrackSourceURL | URL to DRTrack Source Service. Example: http://drtquery.my.DRTrackSite.com/api/DRTrackService |
IntervalInSeconds | The number of seconds between polling Integration for changes. Default = 300 |
ResultQueueURL | URL to DRTrack. Example: http://jd.appianlogistics.com/login.aspx?importorders=true |
NoOfDaysToQuery | Number of days out from start date to sync. |
StartDateOffset | Offset from current day to query for orders. Example: If -2, then orders created from 2 days before current day are queried. |
DRTrack Source Service
(example: appsettings.json)
DRTrackSourceUrl | URL to DRTrack. Example: http://jd.appianlogistics.com |
UserId | User to connect to DRTrack when importing order adds/updates/deletes. |
Password | Password for user to connect to DRTrack. |
DMSi Agility Query Service
AgilityPassword | Password to connect to Agility API |
AgilitySoapUrl | URL to the Agility SOAP API |
AgilityUser | User to connect to Agility API |
RecordFetchLimit | Number of shipments to retrieve in one call to the API. This is a performance tuning variable that could be decreased to avoid issues on slow connections. Default = 500 |
ResourceRestUrl | URL to Resource API. Example; http://resource.appiangps.com/api/ |
DRTrackRestUrl | URL to root of DRTrack non-SOAP API. Example; http://my.drtrack.com/api/v1.0/ |
AgilityRestUrl | URL to the Agility REST API |
Known Issues
Troubleshooting
500.19 Internal Server Error
Sub-apps added under the root app shouldn't include the ASP.NET Core Module as a handler. If the module is added as a handler in a sub-app's web.config file, a 500.19 Internal Server Error referencing the faulty config. file is received when attempting to browse the sub-app.
(https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-2.1&tabs=aspnetcore2x#sub-application-configuration)
Order Integration Service stops polling after some length of time
When we deployed for production, we noticed the Order Integration Service would stop polling and we would have to access the URL before polling continued. The polling would stop after different duration of successful operations. Sometimes it would work for 3 days before this occurred. To work around this issue, we have configured a Heartbeat service to ping the URL once every few hours.
Service Logs
Log files should be created for each service under a Logs folder created in the installation directory. Verbosity can be increased or decreased by editing the log4net.config file. Change the <level value="xxxxxxxxxx"/> to a value of ALL.
Windows Event Log
If issues arise and nothing is in the service log files, check the Application Windows Event Log.