Input Parameters

<< Click to Display Table of Contents >>

Navigation:  Data > Using Data Input >

Input Parameters

Input parameters are named values that get their value assignments when an agent starts. You can specify these as command-line parameters when running an agent from the command line, or specify them in a GUI window when running the agent from the Windows desktop. Any data consumer command within the agent can use these parameters.

 

inputParameters

 

You can configure input parameters to get value assignments at runtime by using one of these methods:

A GUI window

Command-line parameters

The Content Grabber API

 

Input Parameters with a GUI Window

When running an agent from the Content Grabber editor and the agent has any input parameters, then the Runtime Input Parameters window will automatically appear.

 

Runtime Input Parameters

Runtime Input Parameters

 

The user running the agent can enter runtime values for the input parameters and can even add new parameters that are only defined during the current execution of the agent. An agent will always use the default input parameters when debugging. The Runtime Input Parameters window will not appear when starting a debugging session, so you will need to change the default values if you want to debug the agent with different input parameters.

 

Specifying Input Parameters on the Command Line

When running an agent from the command line, you can specify input parameters as command-line arguments. It's unnecessary to specify all of the input parameters. If you don't specify a parameter, the call to run the agent will use a default value for that parameter. See the topic Running Agent from the Command-Line for more information.

 

The following example runs an agent named Sequentum on the command line, and then sets the input parameters DepartureCity and DestinationCity.

 

RunAgent.exe Sequentum -DepartureCity "Sydney" -DestinationCity "Melbourne"

 

 

Using Input Parameters

Any data consumer command, such as the following, can use input parameters.

Agent

Navigate URL

Set Form Field

Data Value

 

Using Input Parameters

Using Input Parameters

 

 

Using Input Parameters in a Script

Most scripts provide easy access to input parameters from the script arguments. See the topic Scripting for more information. The following example retrieves the input parameter DepartureCity:

 

args.GlobalData.GetString("DepartureCity");