The presence of the function params([Object]$task,[hashtable]$htOpts)
in the
Task Execution Script indicates that parameters should be passed to the execution program.
This is meaningful only for Task Types of java, nodejs or script (and eventually net).
If the params
function is not defined in the Task Execution Script, either the
Options return values are passed if function options
exists or an empty hashtable is used as the parameters.
For a script type program the hashtable is passed as is.
For a Java or NodeJS program the following conversions take place:
If the keyword of the hashtable ends with an =
the keyword (less the =
) is treated as a -def
keyword=value parameter.
If the keyword exists but points to a $null
value the -keyword is passed.
otherwise the -keyword value parameter is passed.
The function params([Object]$task,[hashtable]$htOpts)
in the Task Execution Script returns a
hashtable.
There are several ways this can be implemented. It is necessary to remove extraneous parameters using the hashtable remove
function. Care must be taken to clone the $htOpts
hashtable as this is also used to persist the values in the
options.json.txt file.
The values can also be inspected in the fetchJavaMain
function and the program to execute changed.
Copyright © 2018-2021, 2022, Rexcel System Inc.