Job step parameters and the JobStepExecution object
Key Takeaway
A step script reads its parameter values from the parameters argument. For the ID of the job the step belongs to, call stepExecution.getJobExecution().getJobID(), not getID(), getStepID() or getStepTypeID().
Job step parameters make a custom job step configurable. The developer declares each parameter in the cartridge's steptypes.json file. An administrator enters the values when adding the step to a job in Business Manager. At runtime, the step's script reads those values from a parameters argument. The dw.job.JobStepExecution object gives read-only information about the current step execution and the job execution it belongs to.
Declaring step parameters
You declare parameters per step type in the parameters element of steptypes.json. The file sits in the root folder of the cartridge. Each parameter requires @name, @type and description.
The allowed @type values are boolean, string, long, double, datetime-string, date-string and time-string.
An administrator sets values for these parameters when adding the custom step to a job flow in Business Manager.
If steptypes.json contains errors, the errors are logged. In that case, the custom step types of that cartridge aren't registered, so a bad parameter definition can make the whole step type disappear from Business Manager.