CA Workload Automation (ESP) Powershell Wrapper

Document created by IanRich on Jan 8, 2015Last modified by IanRich on Jan 19, 2015
Version 3Show Document
  • View in full screen mode

Hi Everyone,


As per a few requests I am uploading the CA Workload Automation (ESP) Powershell Wrapper that we use to launch jobs on the CAPA servers with.


There are a few parts to the script, so I will try to briefly explain them.


  • job_mapping.conf

The config file is used to map ESP jobnames to PAM process paths. This is used as a convenience when defining ESP jobs and allows for PAM Process paths to be changed without affecting/editing the ESP jobs.


Example Config:



This entry means ESP can call:

pam_esp_call.ps1 -job test


And it will be translated to run the PAM Process /PathTo/TestProcess


  • generate_secure_string.ps1

The Powershell job requires credentials to make the webservice call to CAPA, we encrypt the password locally on the CAPA nodes so it doesn't have to be passed from ESP as part of the job (there were some issues trying to pass a complex password from ESP to Powershell).

This script can be called via ESP or run manually on the server to generate an encrypted password to be added to the secure.conf file.


  • secure.conf

The secure.conf file will be unique to each node, and contain a list of user id/encrypted passwords used to launch the webservice.


  • pam_esp_call.ps1

This script can be used to launch PAM jobs from ESP with advanced logging of error codes.


The script calls CA ESP Agent's ITPAM Java wrapper, passing it the trace switch. The trace switch enables output of the SOAP request/response stucture. The output is then redirected to a file.

The trace file is then analyzed, we try to extract 2 PAM variables: ESPExitStatusCode & ESPExitReason.


If these variables are found:

ESPExitStatusCode is used as an exit code to pass back to ESP

ESPExitReason is used as a message printed to STDOUT (and therefore can be seen in the ESP spool file)


The zip file contains both the Powershell scripts, and a sample of the config files.

ESP Powershell wrapper for CAPA


If you have any questions about it, I'd be happy to try and help!