Calling Decision Center Ant tasks

Ant tasks are used for administrative tasks such as managing the Decision Center database and projects.

Procedure

  1. Set up ANT and JAVA environment variables.

    For more information, see Setting up the Ant tasks environment.

  2. Download the compressed file that contains the Decision Center API JAR files from the following URL:
    wget https://DC_URL/assets/decision-center-client-api.zip --no-check-certificate

    The DC_URL parameter is the endpoint to access Decision Center. For more information, see Completing post-deployment tasks for Operational Decision Manager.

  3. Decompress decision-center-client-api.zip.
  4. Go to the directory teamserver/bin.
  5. Download the truststore.jks file from https://DC_URL/assets/truststore.jks.
    wget https://DC_URL/assets/truststore.jks --no-check-certificate
  6. Register the truststore in the Java™ project by setting the system SSL properties.
    export ANT_OPTS="-Djavax.net.ssl.trustStore=$PWD/truststore.jks 
    -Djavax.net.ssl.trustStorePassword=changeit 
    -Djavax.net.ssl.trustStoreType=JKS"
  7. Get a Zen API key.
    To call the Decision Center Ant tasks, you must use a Zen API key, which you can get from the Cloud Pak for Business Automation console. For more information, see Generating API keys for authentication.
  8. Call Decision Center Ant tasks by using the following parameters:
    -DrtsAdmin.login=<DC_AUTHORIZED_USER> 
    -DzenApiKey=<DC_AUTHORIZED_USER_ZEN_API_KEY>

    Example to use print-config-param:

    ant print-config-param 
    -DrtsAdmin.login=<DC_AUTHORIZED_USER> 
    -DzenApiKey=<DC_AUTHORIZED_USER_ZEN_API_KEY> 
    -Dserver.url="DC_URL"

    Example to synchronize a project:

    ant synchronize 
    -Ddata=. 
    -Daction=retrieve 
    -DprojectName="YOUR_DECISIONCENTER_PROJECT" 
    -DrtsAdmin.login=<DC_AUTHORIZED_USER> 
    -DzenApiKey=<DC_AUTHORIZED_USER_ZEN_API_KEY> 
    -Dserver.url="DC_URL"