Calling Decision Center Ant tasks
Ant tasks are used for administrative tasks such as managing the Decision Center database and projects.
Procedure
- Set up ANT and JAVA environment variables.
For more information, see Setting up the Ant tasks environment.
-
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-certificateThe DC_URL parameter is the endpoint to access Decision Center. For more information, see Completing post-deployment tasks for Operational Decision Manager.
- Decompress decision-center-client-api.zip.
- Go to the directory teamserver/bin.
- Download the
truststore.jksfile from https://DC_URL/assets/truststore.jks.wget https://DC_URL/assets/truststore.jks --no-check-certificate - 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" - 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.
- 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"