You can also specify any number of action parameters for an action. Each parameter declares a name and the parameter value type. Our test action, for example, has two parameters, one of type String (with name “logString”), and another of type Integer (with name “logInteger”).

To require users to specify a given parameter, include a <required> tag for that parameter and set it to true (see the example above). This tag is optional. If you include it, the ACC displays an error message if users do not specify the parameter.

Users can specify action parameters as either explicit values or expressions when they create scenarios in the ACC. For example, for a parameter of type Integer, they can type an explicit integer value, such as “249,” or select an expression that evaluates to an integer, such as “Person’s age.” When the system executes the action, it evaluates the parameter expressions in the current scenario context; thus the expression “Person’s age” is evaluated to the age in the profile of the person going through the scenario.

For action parameters of type String or String[], you can include the optional tags <action-parameter-repository-name> and <action-parameter-repository-item-type>. Without these tags, users must manually type the repository ID for the item they want when they fill in a parameter. With these tags, however, the ACC displays a dialog box from which users can choose the appropriate item by its display name. The system then passes the repository ID to the action. The following example is from the Give Promotions action in ATG Commerce; it shows how the Promotions action parameter is set up to use these tags:

        Give Promotion
        gives a profile a promotion
          the promotions to be added to the profile
loading table of contents...