Integrate with Theobald yunIO via Nintex Gateway

In this example, you will create an Xtension A set of instructions for Nintex Automation Cloud to use third-party API functionality with Nintex workflows. An Xtension may include workflow actions, start events, forms or file control. for the Theobald yunIO on-premises application via Nintex Gateway.

For more information on yunIO, see the Theobald help documentation: Introduction to yunIO.

Nintex Gateway allows you to integrate on-premises applications with Nintex Automation Cloud. Nintex Gateway acts as middleware to authenticate the communication between Nintex Automation Cloud and your on-premises application, allowing you to connect your application without leaving ports vulnerable in your network.

For more information on Nintex Gateway, see Nintex Gateway.

For more information on creating on-premises Xtensions with Nintex Gateway, see Integrate on-premises applications via Nintex Gateway.

Before you start

  1. Download, install, and configure Nintex Gateway on your network.
  2. See Install and Configure Nintex Gateway.

  3. Download the OpenAPI Specification from your Theobald yunIO installation.
    1. Create a service in yunIO and configure the operations you need.
    2. In this example, the service is called KNA1Service.

    3. Open the Services page in yunIO and download the OpenAPI Specification (Swagger) file.

    4. For more information, see the Theobald yunIO help documentation.

Jump to:

Tip: If you're not familiar with OpenAPI Specifications, we recommend working through our OpenAPI Specification tutorial before you start.

Define the Nintex Gateway host and basePath

In the root level of your OpenAPI Specification:

  1. Add the x-ntx-host property with a value of {{x-ntx-gateway-uri}}.
  2. Change the value of the basePath property to /xtension.

If your OpenAPI Specification does not have a basePath property, create a new basePath property underneath x-ntx-host, and add a value of /xtension.

For more information on overriding the host value, see x-ntx-host.

{
  "swagger": "2.0",
  "info": {
    "version": "1.0.0",
    "title": "yunIO",
    "description": "On-premises yunIO Xtension"
  },
  "host": "yunioservices.theobald-software.com:8175",
  "x-ntx-host": "{{x-ntx-gateway-uri}}",
  "basePath": "/xtension",
  "schemes": [
    "https"
  ]
  ...  
}

Add the validation operation

Nintex Automation Cloud validates all new Nintex Gateway connections The stored authorization credentials for a connector. using a special validation endpoint The address of a specific resource provided by the third-party API. to make sure the Nintex Gateway instance is available at the URL specified in the connection.

In the paths object:

  1. Add a new operation A single request to a third-party API. Operations often become actions in the workflow designer. of /x-ntx-validate.
  2. Add a GET HTTP method The HTTP action to perform on the endpoint, such as GET, POST, DELETE, PUT. In defined inside the operation's path object in the OpenAPI specification..
  3. Add an operationId of validateConnection.
  4. Add the property x-ntx-visibility with a value of internal.
  5. Add a response The return from a third-party API after a request has been made by the client. object of 200.
  6. Add a response object of default for all other response codes.

For more information on defining operations, see our basic OpenAPI Specification tutorial: Define the operations

         
  "paths": {
    "/x-ntx-validate": {
      "get": {
        "operationId": "validateConnection",
        "x-ntx-visibility": "internal",
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Operation Failed."
          }
        }
      }
    },
                    

Add connection validation to the security definition

To ensure Nintex Automation Cloud validates your Nintex Gateway URL when creating a connection, add the validation URL to the security definition using the x-ntx-connection-validation specification extension.

In the securityDefinition object:

  1. Create an object for basic authentication Identifying the API requestor using a username and password passed in the HTTP header., if one doesn't already exist.
  2. See Add basic authentication for help with creating basic authentication security definitions.

  3. Inside the basic security definition, add the x-ntx-connection-validation property.
  4. Inside the x-ntx-connection-validation property, add the property operationId with a value of validateConnection.

For more information on validation operations, see x-ntx-connection-validation.

 
"securityDefinitions": {
    "basic": {
        "type": "basic",
        "x-ntx-connection-validation": {
            "operationId": "validateConnection"
        }
    }
}

Add connection properties to the security definition

When creating a connection to your Xtension, workflow designers need to:

  • Select which Nintex Gateway integration to use in your Nintex Automation Cloud tenant.
  • Specify the yunIO service URL.
  • Authenticate to your network via Nintex Gateway.
  • Authenticate to the yunIO application.

This information is collected by additional fields that are displayed on the Add connection screen. These fields are defined in your OpenAPI Specification using the x-ntx-connection-properties specification extension.

To add connection properties to the security definition:

  1. Inside the basic security definition, add the x-ntx-connection-properties object.
  2. Inside the x-ntx-connection-properties object:
    1. Add a type property with a value of object.
    2. Add a properties object.

We will add the connection properties to this properties object in the next steps.

For more information on defining custom connection properties, see x-ntx-connection-properties.

 
"securityDefinitions": {
    "basic": {
        "type": "basic",
        "x-ntx-connection-validation": {
            "operationId": "validateConnection"
        },
        "x-ntx-connection-properties": {
            "type": "object", 
            "properties": {}
        }
    }
}

Add a connection property for Nintex Gateway integration

Your Nintex Automation Cloud tenant may have more than one Nintex Gateway integration. Add the x-ntx-gateway-id connection property so your workflow designers can select from a drop-down list of existing Nintex Gateway integrations when they create their connections.

Inside the properties object of x-ntx-connection-properties:

  1. Add an x-ntx-gateway-id object.
  2. Inside the x-ntx-gateway-id object:
    1. Add a type property with the value of string.
    2. Add a title property with the value Select Nintex Gateway.
 
"x-ntx-connection-properties": {
    "type": "object", 
    "properties": {
        "x-ntx-gateway-id": {
           "type": "string",
           "title": "Select Nintex Gateway"
        }
    }
}

Add a connection property for the yunIO service URL

The yunIO service URL is the base URL where the yunIO application expects to receive requests from integrating services.

Add the x-ntx-gateway-xtension-baseurl property to store the yunIO service URL:

Inside the properties object of x-ntx-connection-properties:

  1. Add an x-ntx-gateway-xtension-baseurl object.
  2. Inside the x-ntx-gateway-xtension-baseurl object:
    1. Add a type property with the value of string.
    2. Add a title property with the value yunIO service URL.
    3. Add a description property with the value Base URL of the yunIO service, including HTTPS://.
    4. Add a pattern property with the value of ^(https?:\/\/[^\/?#]+)(?:[\/]|\/.+|)$.
 
"x-ntx-connection-properties": {
    "type": "object", 
    "properties": {
        ...
        "x-ntx-gateway-xtension-baseurl": {
           "type": "string",
           "title": "yunIO service URL",
           "description": "Base URL of the yunIO service, including HTTPS://.",
           "pattern": "^(https?:\/\/[^\/?#]+)(?:[\/]|\/.+|)$"
        }
    }
}

Add connection properties for yunIO authentication

Add username and password connection properties to collect the username and password that will be supplied to yunIO when making requests.

Inside the properties object of x-ntx-connection-properties:

  1. Add a username object.
  2. Inside the username object:
    1. Add a type property with the value of string.
    2. Add a title property with the value yunIO username.
  3. Add a password object.
  4. Inside the password object:
    1. Add a type property with the value of string.
    2. Add a title property with the value yunIO password.
    3. Add a format property with the value password.
 
"x-ntx-connection-properties": {
    "type": "object", 
    "properties": {
        ...
        "username": {
           "type": "string",
           "title": "yunIO username"
        },
        "password": {
           "type": "string",
           "title": "yunIO password"
        }
    }
}

Add connection properties for Nintex Gateway authentication

Add connection properties for the Active Directory username and password. These credentials will be used by Nintex Gateway to authenticate to your network.

Inside the properties object of x-ntx-connection-properties:

  1. Add an x-ntx-gateway-username object.
  2. Inside the x-ntx-gateway-username object:
    1. Add a type property with the value of string.
    2. Add a title property with the value Active Directory username.
  3. Add an x-ntx-gateway-password object.
  4. Inside the x-ntx-gateway-password object:
    1. Add a type property with the value of string.
    2. Add a title property with the value Active Directory password.
    3. Add a format property with the value password.

If your organization does not use Active Directory, you can also authenticate using API keys. See Managed authentication with an API key .

 
"x-ntx-connection-properties": {
    "type": "object", 
    "properties": {
        ...
        "x-ntx-gateway-username": {
           "type": "string",
           "title": "Active Directory username"
        },
        "x-ntx-gateway-password": {
           "type": "string",
           "title": "Active Directory password",
           "format": "password"
        }
    }
}

Add the list of required connection properties

Designate all the connection properties you have added as required so the workflow designer must complete them all when they create a connection to yunIO.

Inside the properties object of x-ntx-connection-properties:

  1. Add a required property.
  2. For the value of the required property, add an array of the property names of each connection property you created.
 
"securityDefinitions": {
   "basic": {
        "type": "basic",
        "x-ntx-connection-validation": {
            "operationId": "validateConnection"
        },
        "x-ntx-connection-properties": {
            "type": "object", 
            "required": [
               "x-ntx-gateway-username",
               "x-ntx-gateway-password",
               "x-ntx-gateway-id",
               "x-ntx-gateway-xtension-baseurl",
               "username",
               "password"
            ],
            "properties": { ... }
            

Example OpenAPI Specification

{
  "swagger": "2.0",
  "info": {
    "title": "yunIO",
    "version": "1.0.0"
  },
  "host": "yunioservices.theobald-software.com:8175",
  "x-ntx-host": "{{x-ntx-gateway-uri}}",
  "basePath": "/xtension",
  "schemes": [
    "https"
  ],
  "paths": {
    "/services/KNA1Service": {
      "post": {
        "summary": "KNA1Service",
        "operationId": "post-KNA1Service",
        "consumes": [
          "application/json"
        ],
        "security": [
          {
            "basic": []
          }
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "JSON data for runtime parameters",
            "required": false,
            "schema": {
              "type": "object",
              "properties": {
                "whereClause": {
                  "type": "string",
                  "default": ""
                }
              }
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "KUNNR": {
                    "type": "string",
                    "maxLength": 10,
                    "readOnly": true
                  },
                  "LAND1": {
                    "type": "string",
                    "maxLength": 3,
                    "readOnly": true
                  },
                  "NAME1": {
                    "type": "string",
                    "maxLength": 35,
                    "readOnly": true
                  },
                  "NAME2": {
                    "type": "string",
                    "maxLength": 35,
                    "readOnly": true
                  },
                  "ORT01": {
                    "type": "string",
                    "maxLength": 35,
                    "readOnly": true
                  },
                  "PSTLZ": {
                    "type": "string",
                    "maxLength": 10,
                    "readOnly": true
                  },
                  "REGIO": {
                    "type": "string",
                    "maxLength": 3,
                    "readOnly": true
                  },
                  "STRAS": {
                    "type": "string",
                    "maxLength": 35,
                    "readOnly": true
                  },
                  "TELF1": {
                    "type": "string",
                    "maxLength": 16,
                    "readOnly": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "no basic auth provided"
          }
        }
      }
    },
    "/x-ntx-validate": {
      "get": {
        "operationId": "validateConnection",
        "x-ntx-visibilty": "internal",
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Operation Failed."
          }
        }
      }
    }
  },
  "securityDefinitions": {
    "basic": {
      "type": "basic",
      "x-ntx-connection-validation": {
        "operationId": "validateConnection"
      },
      "x-ntx-connection-properties": {
        "type": "object",
        "required": [
          "x-ntx-gateway-username",
          "x-ntx-gateway-password",
          "x-ntx-gateway-id",
          "x-ntx-gateway-xtension-baseurl",
          "username",
          "password"
        ],
        "properties": {
          "x-ntx-gateway-username": {
            "type": "string",
            "title": "Active Directory username"
          },
          "x-ntx-gateway-password": {
            "type": "string",
            "title": "Active Directory password",
            "format": "password"
          },
          "x-ntx-gateway-id": {
            "type": "string",
            "title": "Select Nintex Gateway"
          },
          "x-ntx-gateway-xtension-baseurl": {
            "type": "string",
            "title": "yunIO service URL",
            "description": "Base URL of the yunIO service, including HTTPS.",
            "pattern": "^(https?:\/\/[^\/?#]+)(?:[\/]|\/.+|)$"
          },
          "username": {
            "type": "string",
            "title": "yunIO username"
          },
          "password": {
            "type": "string",
            "title": "yunIO password",
            "format": "password"
          }
        }
      }
    }
  },
  "x-ntx-render-version": 2
}

Create the connection

Step 1: Add your Xtension

Import the OpenAPI Specification you created into Nintex Automation Cloud:

  1. Open your Nintex Automation Cloud tenancy.
  2. Click Xtensions in the dashboard to open the Xtensions page.
  3. Click  in the Private connector list.
  4. Click Choose a file. Navigate to the OpenAPI Specification on your computer.
  5. Wait for Nintex Automation Cloud to validate the file.
  6. Click Next.

    Nintex Automation Cloud detects the basic authentication security template.

  1. Click Next.
  1. Edit the Name of the Xtension, which becomes the name of the action group in the Workflow designer.
  2. Edit the Description of the Xtension. This appears in the Private connector list in the Xtensions page.
  3. Select or upload an icon for the Xtension. This is displayed for each action or event in the Workflow designer.
  4. Click Publish.

Step 2: Create a new connection

  1. Click Connections in the dashboard to open the Connections page.
  2. Click  in the Connector list.
  3. Select the yunIO connector you created.
  4. Click Next.
  5. Configure the connection:
    1. In the Nintex Gateway field, select your Nintex Gateway integration.
    2. In the Connection name field, type a short but descriptive name to identify this connection.
    3. In the yunIO service URL field, type the base URL of your yunIO service, including the HTTPS.
    4. In the yunIO username field, type your yunIO username.
    5. In the yunIO password field, type your yunIO password.
    6. In the Active Directory username field, type the username you use in your organization's Active Directory service.
    7. In the Active Directory password field, type the password you use in your organization's Active Directory service.
  6. Click Connect.