How do I call an EXE file from a CA Automation Point rule?

Document ID : KB000047323
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction: 

CA Automation Point users may want to invoke an external EXE file stored in your Windows File system under certain conditions (e.g. a MSGID is detected by the rules engine). This article describes an approach for invoking the EXE from a MSGID rule.

Question: 

We are trying to get AP to execute an EXE file whenever a message occurs on a console session we are monitoring, so would like to know the rule syntax. We placed the EXE file in the REXX directory. How do we call this EXE from a rule?

Environment:  

All Supported Windows Server environments

Answer: 

The best approach for accomplishing your goal of calling an EXE stored in your MyFiles\Rexx directory whenever the AP rules engine detects a MSGID from a message that occurs on a host console that you are monitoring with an Automation Point console session is to use the REXX keyword in your MSGID rule, e.g:

MSGID(xxxxx) REXX(rexxname parms)

The trick here is to first write a REXX program that invokes the ADDRESS 'CMD' command processor to call your EXE. Please check this OO-Rexx language reference page for more information about this command.

Here's an example of what your key ADDRESS CMD command might look like in your REXX program:

ADDRESS "CMD NAMEOFYOUREXE parm1 parm2"