
Overview
This plugin invokes a third-party application or a script running locally on the workflow
server. The integration mechanism conforms to the CGI-BIN protocol used by web and application
servers (for example, input parameters are provided as environment variables, and output is
provided on the stdio).
Saved Parameters Description
- Name: The name used to identify a saved Local Execution configured instance.
- Comments: Some comments about this saved Local Execution configured instance.
- Command: The command line to be executed. That string can include variables that
get replaced during the execution by their run-time values. This field is constructed by
appending the command executable selected with the command arguments of the configuration
interface. The command exectuable must be placed in the
/opt/aspera/scripts folder
- Multiline: Checking this option causes the result of the stdio to be returned as an
array in the Multi output variable, instead of as a text in the stdio output
variable
- Mandatory Inputs: Defines required inputs that will be passed to the script or
executable call as environment variables.
- Optional Inputs: Same as for mandatory inputs, but for optional inputs.
- Parallel Execution: Checking this option enables the script or executable to
communicate intermediate status information while being executed. The API for reporting
status is described in the Operating Instructions section.
- Formatted Outputs: Defines the list of typed outputs expected to be provided by the
script or executable. The API for returning outputs is described in Operating Instructions.
Inputs Description
The list of inputs depends on the configuration of the LocalExecution action template. By
default, no inputs are provided.
- Command line inputs: All the variables listed in the command line field are
mandatory and must be of type string.
- Environment variable inputs: The variables listed in either the Mandatory or
Optional input fields can be typed, but will be converted to string before being stored in
their target environment variable.
Outputs Description
- Multi: Only if Multiline is selected; the stdio output broken
down into an array with one entry for each line of stdio.
- stdio: Only if Multiline is not checked; the stdio of the
execution is a string.
- Formatted Outputs: If defined, the values returned by the execution for the outputs
variable specified in the Formatted Outputs configuration field.
Note: If the command exit code is different from 0, the plugin will return in failure.
Supported Actions
Cancel
Dependencies
None
Operating Instructions
This action executes the command line provided in its configuration. The executable or script
identified in the command line is provided some inputs parameters as command line arguments
and some as environment variables. The command line string use can contain static text and
variable expanded at run-time. Variable are indicated using the syntax
<%=variable_name%> embedded into static text, for example, "file_scan.sh
<%=file_name%> -s <%=icap_sever_name%>".
The executables or script must be located in #{EXECUTABLE_DIRECTORY}. Scripts must
have a leading "shebang" ("!").
If the 'parallel execution' mode is selected, status update can be provided by the
executable using the following format:
'-#STATUS--#--STATUS MESSAGE#-'
Either
STATUS or
STATUS message can be left empty. For example:
- * '-#Error--#--Action was stopped#-' -> would update the status to
Error with a status message of Action was stopped.
- * '-#--#--File tester.txt was scanned successfully#-' -> would update just the
status message.
If a list of outputs is provided in the
formatted outputs field, specified
variables will be extracted from the
stdio if they follow the following
formatting:
'-#OUTPUT:VARIABLE NAME--#--VARIABLE VALUE#-'
For example: '-#OUTPUT:size--#--120568#-' -> will populate an outputs entry
@outputs['size']=120568, if an output of type TYPE_INT is specified.
Note: The stdio line containing the formatted inputs above are removed from the
stdio or multiline output variable if the formatted outputs field is not
empty.