|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |
The External Command activity allows you to execute an operating system command. This activity waits for the command to complete before transitioning to the next activity. Optionally, the command output and any errors can be included in this activity’s output schema, written to a file, or both.
After creating a script to run commands in the background, specify the script as the command to run in the External Command activity. The script runs the desired command and returns the process ID of the process it started. The return code of the script is stored in the returnCode item of the External Command activity’s output.
The command line to execute. You can also specify any input and command-line arguments to the command in this field. You cannot specify more than one command by piping output from one command to another (for example, ls | more is not allowed).You can specify a global variable for this configuration field. This allows you to easily specify different commands on different operating systems. For example, you may specify %%EXTERNAL_COMMAND%% as the value for this field. On MS Windows, the value of the global variable may be the following:If the command to execute is not located in one of the directories specified in the PATH environment variable (on UNIX or Windows), you can specify the full path for the executable command or you can use the environment input element to specify the environment for the command. See TIBCO ActiveMatrix BusinessWorks Process Design for more information about mapping and transforming input data.
For example, on UNIX, typing sed into a command prompt allows you to enter more text as input into the sed command.Use &crlf; in the string for this item to specify a carriage return (that is, &crlf; simulates pressing the Enter key). The environment variable settings used for running the command. This element is specified as a comma-separated list of <name>=<value> pairs where <name> is the name of the environment variable and <value> is the value of the environment variable.
• \r — newline carriage return character
• \n — newline character
• \t — tab character
• \\ — backslash characterFor example, \r\n signifies to split at a carriage return/linefeed, \\ signifies to split when a backslash is encountered.
Any output produced by the command and sent to stdout. This output item is only available if the Make Output Available as Activity Output field is checked on the Configuration tab. Any errors produced by the command and sent to stderr. This element is only available if the "Make Output Available as Activity Output" field is checked on the Configuration tab.The Error Output tab lists the possible exceptions that can be thrown by this activity. See TIBCO ActiveMatrix BusinessWorks Error Codes for more information about error codes and corrective action to take.
|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |