Saving Runtime Parameters
When a task processes, runtime arguments that cannot be passed
at initiation may need to be calculated. These are derived parameters
that can change each time a task runs. The BaseIPDTask provides
a method to ensure the originally derived runtime parameters are used
when a task restarts or resumes after a failure.
protected boolean saveRuntimeParm(String runtimeKey, String runtimeValue)
throws TaskProcessingException
protected boolean saveRuntimeParms(List<TaskParm> runtimeParms)
throws TaskProcessingExceptionThese methods allow the task to store runtime parameters in the Services Framework repository. The parameters are tied
directly to the activity record of the task. During restart, the task can use the
getRuntimeParm() method to retrieve any previously stored parameter for reprocessing.
Note: When saving a list of runtime parameters, the only values needed for the TaskParm
object are the parameter key and parameter value.
List<TaskParm> runtimeParmsToSave = new ArrayList<TaskParm>();
runtimeParmsToSave.add( new TaskParm(RUNTIME_PARM_DATE, aDate) );
runtimeParmsToSave.add( new TaskParm(RUNTIME_PARM_GENERATED_LICENSE, aLicense) );
saveRuntimeParms(runtimeParmsToSave);
Refer to the Javadoc information for additional information about methods and signatures.