The following steps are necessary to set up deployable services and order Integration between DMSi Agility and DRTrack.

CONTENTS

  

Deploy Services

The following three services must be deployed and configured to IIS:

  1. 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.
  2. DRTrack Query Service − The Order Integration Service sends requests for DRTrack orders during sync processing. 
  3. 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:

  1. 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.
  2. Install .NET Core Hosting Bundle
  3. Create App Pools in IIS
  4. Create applications in IIS
  5. Deploy services
  6. 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. 

  1. Create a new application pool and make sure that "No Managed Code" is selected.  


d72be47fe9754f0c63274bbaa88351bc


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.


65eae60630607b8ea685c7a038007a22

Create Applications in IIS

  1. Create a folder on the disk for each service to be installed.
  2. In IIS Manager, create a new application.
  3. Set the site name.
  4. For physical path, select the folder created in previous step.
  5. Select the Application pool that was created.
  6. Leave Bindings to their default values and set the Host name to the same as the site name.
  7. Repeat steps 2 through 6 for the additional services.


74aac0b8ae53812f6bac68f1f0005654


Deploy Services

  1. Copy the contents of each service ZIP file to a unique folder location.
  2. Rename the web.config.standard file to web.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.