Database Connections for Server Workflows

Geocortex Workflow has activities that enable you to access databases from server workflows, for example, the Run SQL Query and Run SQL Non-Query activities. To use these activities in server workflows, you must first configure access to your database:

  1. Check the list in Supported Data Providers to make sure that Workflow Server supports your type of database. If necessary, install the DLL file for the data provider.

  2. Configure the database's connection string.

Supported Data Providers

Data Providers Supported by Geocortex Workflow Server

Supported Data Provider

Install Provider DLL?

Microsoft SQL Server

No

MySQL

Yes

ODBC

No

Oracle

Yes

SQLite

No

Install a Data Provider's DLL File

To access a MySQL or Oracle database from server workflows, you must first install a DLL file for the data provider in your on-premises installation of Geocortex Workflow.

To install a data provider's DLL file:

  1. Download the data provider's NuGet package to the Geocortex Workflow server:

  2. Extract the contents of the package using a tool like 7-Zip.

  3. In the extracted contents, copy the DLL file for the data provider to the clipboard:

  4. Navigate to the Deployment\service folder in your Geocortex Workflow installation.

    The default installation location is C:\Program Files\Latitude Geographics\Geocortex Workflow.

  5. Paste the DLL file into Deployment\service.

  6. In IIS, recycle the GeocortexWorkflow application pool.

Configure Database Connection Strings

Connection strings provide Geocortex Workflow with the information it needs to access the databases from server workflows. There are two ways to specify a connection string:

You must know in advance what information is required to connect to a particular database. If you aren't sure, ask the database administrator or refer to a resource like The Connection Strings Reference.

To configure connection strings in the database settings file:

This procedure is optional. If you prefer, you can specify the connection string each time you use an activity that accesses the database.

  1. Navigate to the data directory in your Geocortex Workflow installation.

    The default location is C:\ProgramData\Geocortex\Workflow.

    To find out the location of the data directory, open the Post Installer and look on the Data panel.

  2. Edit the databasesettings.json file as an administrator.

  3. Set the value of ConnectionStrings to the connection strings for the databases that you want to access in server workflows.

    Each connection string is specified as a name/value pair ("name": "value"), where value is the connection string. If you specify multiple connections, separate them with commas. You can use any valid JSON name that you want, provided it is unique across the connection strings. You will use the name to specify the database when you configure a server activity that accesses the database.

    For example:

    {
        "DatabaseSettings": {
            "ConnectionStrings": {
                "MySQLDatabase": "Server=host.domain.com; User Id=sa; Password=myPass;",
                "OracleDatabase": "User Id=system; Password=myPass; DataSource=host.domain.com:1521;"
            }
        }
    }
  4. Save and close the file.

  5. In IIS, recycle the GeocortexWorkflow application pool.

© 2018 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.9