Configuring External Scripts

Use the following statement to configure an external script for the SRC VTA:

shared vta group name processor scripts external-script name {full-path full-path;parameters parameters;return-type return-type;return-attribute return-attribute;}
  1. From configuration mode, access the statement that configures an external script and specify the name of the external script. For example, to configure an external script called script1:
    [edit]user@host# edit shared vta group vta1 processor scripts external-script script1
  2. Specify the full path name to the external script.
    [edit shared vta group vta1 processor scripts external-script script1]user@host# set full-path full-path

    You must specify a fully qualified path to an executable program on the local file system.

  3. Specify the parameters required by the script as [a b c]. When an action invokes the script, the action must supply values for these parameters in the same order as they are defined here.
    [edit shared vta group vta1 processor scripts external-script script1]user@host# set parameters parameters
  4. (Optional) Specify the Java type of the return attribute.
    [edit shared vta group vta1 processor scripts external-script script1]user@host# set return-type return-type

    Where return-type is one of the following:

    • Integer
    • Long
    • Float
    • Double
    • String
    • Boolean
  5. (Optional) Specify the name of the return attribute.
    [edit shared vta group vta1 processor scripts external-script script1]user@host# set return-attribute return-attribute

    Specify an attribute that provides the return value of the script as a valid Java identifier that subsequent actions and event handlers can refer to. If this attribute is not set, the return value is not used by the event. The external script returns the value by printing to standard output.

    Note: The name of a return attribute cannot start with an underscore (_) because these event attributes are reserved for internal use.

Related Documentation