upgrading the DAT

Upgrading the CALI DAT on Azure

Tobias Nteireho



This tutorial illustrates the steps to upgrade the CALI A2J DAT on Azure. This tutorial requires that you followed the previous setup instructions and have a working setup. The major differences between the current and previous versions of the DAT are the addition of support for pdf templates, templates file format, bug fixes, and install procedure. Templates that worked on the previous DAT will have to be converted to work properly with this DAT. The new DAT targets node 8 which is the current mature LTS version of node. The IIS and Azure setup procedures have not changed. Web.config will not need to be updated if the DAT code is placed in the same directory. Below are the instructions for upgrading the DAT on windows.


Obtaining the DAT:

The DAT is kept up to date in the public github repo located at https://github.com/ccali/a2jdat. Zipped packages are published in releases at https://github.com/ccali/a2jdat/releases. The current DAT as of this writing is here: https://github.com/CCALI/A2JDAT/releases/tag/1.0.0.


Install Node and NVM:

If you have installed the DAT following the previous instructions, you should have node 6.9.5. The current DAT depends on 8.9.4. The easiest way to manage different node versions is with the Node Version Manager, nvm, with main repository located here: https://github.com/coreybutler/nvm-windows.


Uninstall Node and install the latest nvm located here https://github.com/coreybutler/nvm-windows/releases/download/1.1.6/nvm-setup.zip.


In a terminal type


nvm install 8.9.4

nvm use 8.9.4


Confirm that the correct node version is being used

node -v


Should output 8.9.4


Ensure Node is in PATH:

The node installer might not always set the PATH variable correctly. Check Environment variables to ensure that there is an entry for the folder containing node.exe.  For this tutorial that folder is C:\Program Files\nodejs\.

Configure Node Permissions:

Node.exe must be added to the IIS_IUSRS group in order to be allowed to handle requests. This must occur every time the node executable is switched through nvm. Open a command prompt and run as administrator and run

icacls “%programfiles%\nodejs\node.exe” /grant IIS_IUSRS:rx


Install global DAT dependencies and subdependencies:


Git is a source control manager and required for npm. Install Git by downloading latest from


As of this documents writing, the latest version for the system in the azure demo environment is located at:



Install build tools:


The node sub-dependencies for the DAT must be built locally on the target system and requires build tools for languages other than node. Run the command below to install the necessary build tools:


npm --add-python-to-path='true' --debug install --global windows-build-tools


This requires administrator access. This is a very lengthy install-  it can take over an hour even on a fast connection.


npm install node-pre-gyp babel-cli steal-tools -g


Compile the DAT:


In a terminal navigate to the DAT folder. Run the following commands

npm install

cd js

npm install bootstrap

cd ..

npm run build

npm run build:server


Configure the DAT- New Key:

A new required key, "VIEWER_PATH", has been added to config.json which tells the DAT software the location of the viewer. An example of config.json for windows with the new key is below.




 "SERVER_URL": "http://localhost",

 "GUIDES_DIR": "C:\\inetpub\\wwwroot\\a2j-viewer-6-2018-04-13\\a2j-viewer\\guides",

 "GUIDES_URL": "../a2j-viewer/guides",

 "SQL_HOST": "localhost",

 "SQL_USERNAME": "root",

 "SQL_PASSWD": "root",

 "SQL_DBNAME": "caja",

 "SQL_PORT": 3306,

 "DRUPAL_HOST": "localhost",


 "DRUPAL_PASSWD": "root",

 "DRUPAL_DBNAME": "D7commons",

 "DRUPAL_PORT": 3306,

 "WKHTMLTOPDF_PATH": "C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf",

 "VIEWER_PATH": "C:\\inetpub\\wwwroot\\a2j-viewer\\viewer\\"



Test the DAT:

The testing procedure has not changed. Open a browser and navigate to localhost/a2j-viewer/viewer. This will open the demonstration page. Run the default interview. At the end of the interview, after selecting Generate DOC from A2J DAT Template, a pdf will be generated