Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download the service connector from the Axway Marketplace.
  2. Unzip the service connector into the /serviceconnectors/<connector name> folder in your project directory.
    Note: The new service connectors are plain flow-node modules but they are not installed as such in API Builder V3.0.0. The zip file will contain the package folder that contains the actual connector. Rename the package folder after unzipping to match your connector name.
  3. From the project directory, execute the following command to install the HTTP communication module:

    Code Block
    languagebash
    npm i requester-ce
  4. From the project directory, execute the following command:

    Code Block
    languagebash
    appc run
  5. Open the API Orchestration flow editor in the API Builder Console and verify that the service connector is listed and is available for use in flows.

...

To install a model-first connector, execute the appc install connector/<CONNECTOR_NAME> command from the project's directory. The command downloads and installs the connector in the node_modules/connector directory, updates the appc.json file, and creates a connector configuration file in the project's conf directory.

Code Block
languagebash
$ appc install connector/appc.mysql
Appcelerator Command-Line Interface, version 0.2.230
Copyright (c) 2014-2015, Appcelerator, Inc.  All Rights Reserved.

Installing dependencies... <APIBuilderProject>
Checking for 1 module: connector/appc.mysql
Fetching connector/appc.mysql@1.0.43
Installed 1 module
connector/appc.mysql provided a default configuration example which was written to conf/appc.mysql.default.js
You must update the config file located in ./<APIBuilderProject>/conf/appc.mysql.default.js before you can use it!
Installed:  connector/appc.mysql

...

Code Block
titleconf/appc.mysql.default.js
languagejs
module.exports = {
    connectors: {
        'appc.mysql': {
            connectionPooling: true,
            connectionLimit: 10,
            database: 'test',
            user: 'root',
            password: '',
            host: 'localhost',
            port: 3306,
            generateModelsFromSchema: true,
            modelAutogen: true
        }
    }
};

...

Code Block
titleconf/myconnector.default.js
languagejs
module.exports = {
    connectors: {
        'connector.name': {
            setting1: 'foo',
            setting2: 'bar',
            setting3: 'baz',
            modelAutogen: false
        }
    }
};

...

Code Block
titlemodels/employee.js
languagejs
var Arrow = require('arrow');
 
var employee = Arrow.Model.reduce('appc.mysql/employee','employee',{
    fields: {
        first_name: {type: String, description: 'Give name'}
        last_name: {type: String, description: 'Family name'}
    },
    connector: 'appc.mysql'
});
 
module.exports = employee;

...

  1. Open the appc.json file and delete the connector you want to remove from the dependencies object. For example, if you want to remove the MySQL connector, remove the "connector/appc.mysql": "^1.0.34". Note that you will need to remove the trailing comma at the end of the arrowdb line.

    Code Block
    languagejs
    {
      "type": "api",
      "group": "arrow",
      "dependencies": {
        "connector/appc.arrowdb": "^1.0.52",
        "connector/appc.mysql": "^1.0.34"
      }
    }
  2. Delete the connector's configuration file(s) from the project conf directory. The file(s) will contain the name of the connector.
  3. Delete the connector's directory in the node_modules/connectors/ directory. The directory will contain the name of the connector.