Run a CIS 6 project

This page describes how to run your adapter from within the Eclipse IDE during development. The instructions can be easily adapted to other IDEs.

Integration adapters are designed to run witihin the context of a Deployment Framework (DFW), not an IDE. To run your adapter within an IDE requires some extra steps, but this will save you time and allow you to use your IDE's debugging tools.

Before you can run your adapter from within your IDE, you must package and deploy your adapter's configuration files to your Deployment Framework. Your adapter project includes configuration files for Liberator and Transformer that define your adapter as a DataSource peer and provide routing directives for the subjects your adapter serves (data services).

Follow the steps below:

  1. Deploy your adapter's configuration to your DFW
  2. Configure Eclipse to run your adapter

1. Deploy your adapter's configuration to your DFW

This section describes how to export your adapter's configuration in a config-only Caplin Platform Blade and deploy the blade to your Deployment Framework (DFW).

A config-only Caplin Platfom Blade contains only an adapter's configuration files. In addition to use in development, Caplin Platform Blades that contain only configuration files are used in production too. Liberator and Transformer use configuration blades for convenient activation and deactivation of their built-in features.

Note: if you change the configuration of your adapter during development, then you must re-export and re-deploy your adapter's configuration to your DFW.

Export your adapter's configuration

Follow the steps below to export your adapter's configuration in a config-only Caplin Platform Blade:

  1. Open a Bash shell
  2. Create a directory to hold new blades:

    mkdir ~/blades
  3. From the root directory of your CIS installation, run the CIS export command to export your adapter's configuration as a config-only blade. For example, to export the configuration for a project in directory ~/src/PricingAdapter, execute one of the commands below:

    • On Linux and MacOS, use Bash file paths for the project directory and the output directory:

      java -jar tools/cis-blade-toolkit-version.jar \
         export ~/src/PricingAdapter \
         -o ~/blades \
         --config-only
    • On Cygwin, use Microsoft Windows file paths for the project directory and the output directory:

      java -jar tools/cis-blade-toolkit-version.jar \
         export 'C:\\cygwin64\\home\\username\\src\\PricingAdapter' \
         -o 'C:\\cygwin64\\home\\username\\blades' \
         --config-only

Deploy your adapter's configuration

Follow the steps below to deploy your adapter's configuration to your Deployment Framework:

  1. From the root directory of your Deployment Framework, run the command below to stop all running Platform components:

    ./dfw stop
  2. Copy your project's config-only blade to your Deployment Framework's kits directory. For example, to copy the config-only blade created in the previous section, execute the command below:

    cp ~/blades/PricingAdapter-version.zip ~/DeploymentFramework-version/kits
  3. From the root directory of your DFW, run the command below to deploy your blade:

    ./dfw deploy
  4. From the root directory of your DFW, run the command below to start all Platform components:

    ./dfw start

2. Configure Eclipse to run your adapter

Follow the steps below to configure Eclipse to run your adapter:

  1. In Eclipse, click Run > Run Configurations. The Run Configurations dialog appears.
  2. From the list of configuration types, right-click Java Application and select New
  3. In the Name box, type a name for this Run Configuration. A good choice would be the name of your adapter's project in Eclipse.
  4. In the Project box, click Browse, and select your adapter's project in Eclipse.
  5. In the Main class box, enter the fully-qualified name of the main class of your adapter.
  6. Click the Arguments tab
  7. In the Working directory box, select Other, click File System, and select the path to your adapter's DataSource directory in your Deployment Framework.

    If you're running Linux or MacOS, which recognise Unix symbolic links, then select the logical path to your adapter's DataSource directory:

    <path_to_deployment_framework>/active_blades/blade_name/DataSource

    If you're running Microsoft Windows, which does not recognise Unix symbolic links, then select the physical path to your adapter's DataSource directory:

    <path_to_deployment_framework>\kits\blade-name\bladename-version\DataSource
  8. If you created your project using the CIS Toolkit argument -i trading, then your adapter needs an additional command-line argument supplying the path to the adapter's trading-provider.properties file in your Deployment Framework. In the Program arguments field, add the following argument:

    --trading-property-file=path_to_properties_file
  9. Click the Environment tab, click New, and set a new environment variable CONFIG_BASE to the absolute path to your DFW's global config directory.
  10. Click the Common tab, and in Display in favorites menu, select Run.
  11. At the bottom of the dialog, click the Run button.

To run your adapter on subsequent occasions, click Run > Run, or press Ctrl-F11.