Open Beta

Create your business services using CLI

Business services are functions that make up a business flow. Axway's text-based command line interface (CLI) is used to develop and manage the services in your AMPLIFY project. Why CLI?

  • It requires limited system resources
  • It is fast
  • You can bundle commands

Before you start

Create an administrator account for Axway AMPLIFY Platform. See Create account.

Create and deploy your runtime environment. See Configure and deploy the Runtime Services

Objectives

Learn how to install and initialize your business service and then use the AMPLIFY Choreography CLI commands to develop and manage your AMPLIFY project.

Note   All CLI commands require authentication. You must be logged in to the Axway AMPLIFY Platform.

Install the Axway CLI

  1. Install Node.js 10.15.1 LTS or later.
  2. Run the following command: 
  3. $ [sudo] npm install -g @axway/amplify-cli
  4. Run the AMPLIFY package manager command to install the AMPLIFY Choreography CLI:  
  5. $ amplify pm install @axway/amplify-ace-cli
  6. Run the following command to log into the Axway AMPLIFY Platform:
$ amplify auth login

See available login and auth options using the command:
$ amplify auth login -h

To log out of the Axway AMPLIFY Platform, run the following command:

$ amplify auth logout
See available logout and auth options using the command:
$ amplify auth logout -h
  1. Configure AMPLIFY Choreography CLI:
  • For pre-production and production, the CLI uses https://preprod.ace.axwaytest.net and https://choreography.platform.axway.com. This is based on env config in AMPLIFY CLI. The default env is "prod".
  • To switch the environment to preprod:
  • amplify config set env preprod
  • To setup "ace.runtime.url"::
  • amplify config set ace.runtime.url {ACE_RUNTIME_URL}
  • Initialize your project

    The init command starts the project:

    $ amplify ace init

    You are prompted through a series of questions:

    • Language - (Required): Go, Java, Node.js
    • Service name - (Required): Service name cannot be a single character of ".", "..", "_ ", or ""', or contain non-ASCII alphanumerics other than ".", "..", "_ ", or "-"'
    • Service version - (Required): Enter service version in the form of ‘Major.Minor.Patch’ (e.g., ‘1.0.0’)
    • Service type - (Required): Native Service, Aggregation Service
    • Native Service accepts one business message and outputs 0..n business messages.
    • Aggregation Service accepts 1..n business messages and outputs 0..n business messages. Used to aggregate messages that were previously split by a Native service further up in a choreography.
    • Example: A choreography's initial service is of type Native and accepted one business message with the output of three business messages. Those messages can then go through additional services, also of type Native. Eventually, an Aggregation service will gather all the messages together to be passed to the message processor with a single call. The message processor then completes the processing on all business messages again.
    • Service description - (Optional)
    • Project directory - (Required): Enter a valid path where the project will be created on the local machine. Length cannot exceed 249 characters

    Output when the project is created successfully - 'Project configuration <new configuration file> successfully created.'

    Navigate to the folder where the project was created, locate README.md and follow the instructions to create a business service using the provided template files. Note that the README.md is packaged inside the project template under the generated project folder that was created during initialization.

    Develop your project

    Navigate to the folder where the project was created, locate README.md and follow the instructions to create a business service using the provided template files and the following CLI commands. Note that the README.md is packaged inside the project template under the generated project folder that was created during initialization.

    Related Links