The Shell Exec Adapter provides a generic integration method to edgeCore in cases where a more specific data adapter is not appropriate. This adapter allows edgeCore to execute a command and capture the response which is expected to be in either CSV, JSON, or XML format. Alternatively, users can configure an action off of a Shell Exec connection. The action runs a server side script and, optionally, updates one or more other feeds after the server side script runs.
Both static and dynamic variables can be provided to the script via command line parameters and setting environment variables.
To utilize the Shell Exec Adapter, the first step is to create a Shell Exec Connection. Go to the Pipeline, click + and select the Shell Exec connection. Then, configure the following connection wizard:
The following options may be configured on a Shell Exec Connection:
Shell scripts can be written in a variety of languages and can be used so long as you can execute the script on the same operating system that edgeSuite runs upon, and the script can produce output via STDOUT. Given this, edgeSuite provides wide latitude on the format of data that the script may produce. When attaching a Feed to a Shell Exec Connection, edgeSuite provides a list of File/Stream formats that may be consumed. These formats are documented here.
Regardless of which output formats are selected, the following Shell-specific options will be presented in the Feed configuration stage:
As stated, scripts can be written in a variety of languages. However it should be noted that Operating Systems use different approaches in determining what interpreter to run given a particular command. On UNIX, for instance, the convention is to put a “SheBang” line at the stop of a script (#!/path/to/interpreter). So on platforms that are essentially UNIX derivatives, the interpreter to be used is fairly clear.
On UNIX derivatives, if the path specified in the SheBang line is not absolute then the PATH environment variable should be set such that the interpreter can be found.
On Windows, selecting the correct interpreter is a little more complex. On this platform, file extensions are significant, and generally speaking the system registry maintains program associations for each file extension. Generally speaking, if an interpreter is installed (such as Perl, Python, etc.) the Operating System will know what interpreter to run if you “double-click” on a script. edgeSuite reads this list of file associations from the System Registry and uses the same mapping. Thus, the issue of integrating edgeSuite with various scripts on Windows becomes merely a System Administration issue. If no registry program association with a file extension exists it is a simple matter to add the correct association to the System Registry.