[kepler-dev] [Bug 3207] - consolidate command line execution actors
bugzilla-daemon at ecoinformatics.org
bugzilla-daemon at ecoinformatics.org
Tue Apr 8 10:51:31 PDT 2008
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3207
------- Comment #2 from crawl at sdsc.edu 2008-04-08 10:51 -------
Hi Christopher,
Thanks for helping out. The Ptolemy Exec actor is called "External
Execution" in its KAR file, so there are only two actors that need
to be consolidated.
Both Exec and CommandLineExec have the following:
command portparameter command with arguments to execute
directory fileparameter working dir
environment parameter env vars for child process
input(Stream) input port strings to stdin
output(Stream) output port strings from stdout
error/exitCode output port strings from stderr
Exec additionally has:
throwExceptionOnNonZeroReturn parameter if true, throw exception if failure
CommandLineExec additionally has:
arguments input port command arguments
infileHandle input port use file for stdin (e.g., ./run < file)
outputFile fileportparameter use file for stdout (e.g., ./run > file)
outfileHandle output port copy of outputFile
waitForProcess parameter if true, wait for child proc
outputLineByLine parameter not used
hasTrigger parameter if true, create input trigger port
The first three (arguments, infileHandle, and outputFile) are not
strictly necessary since the same information can be provided in
the command string. (This works in CommandLineExec, but not in Exec;
this is probably due to the different ways they tokenize their
arguments). If outputFile is removed, then so should outfileHandle.
A more flexible approach to trigger the actor is subclass it from
LimitedFiringSource, which would give it a trigger port and
firingCountLimit parameter.
The remaining parameters, throwExceptionOnNonZeroReturn and waitForProcess,
seem useful to me.
Thoughts?
More information about the Kepler-dev
mailing list