AutoSys Workload Automation

 View Only

 Passing Arguments to the Application When Its Event Is Triggered

Itay Dvash's profile image
Itay Dvash posted Feb 15, 2024 05:06 AM

Hello,

In our work, using CA Workload Automation software is quite ****. For each new request, an application is opened, within which there is a single job that runs a script.

On the client side, there is a site that business clients can access and run their applications by specifying the application name/event (the event name is the same as the application name). Behind the scenes, the "triggeradd" CLI command is used to trigger the application's event (basically, to run the script).

Now, sometimes we need to run a script and pass it arguments. Unfortunately, in order to do this we create for each argument value a completely new application.
I would like each project to be in one application and not split into several applications.

Is there a way to pass arguments to the script when the app event is fired? I know that in the job definition in the "pass arguments" section, you can use the %VAR('var_name') statement, and in this way you can set the variable 'var_name' to the desired value before the event triggering. The problem is that if you don't want to pass arguments then the script is not being executed at all (probably because it fails to recognize %VAR('var_name')). Does anyone know of such a way or can offer a suggestion that would help in this matter?

P Verghese's profile image
P Verghese

May be use global variable as an argument to this script. You may update the global variable as required before running the job.

Rgds

P Verghese