Null Action
The null action has only two functions - allow transaction breaks to commit to a database and serve as a place holder for pre and post scripts. Despite this fact, the null action is still useful through inheriting the standard functions of all actions. These functions include: prescripts and postscripts, join points, and being declared the start of a run or flow chart.
Proper Usage
The most basic use of a null action is to force a database commit in the midst of a heavy workload. For example, if you were in the middle of doing a series of large file manipulation actions, you would want to place null actions in advantageous positions to ensure progress would be able to be resumed in the event of a crash or power outage, and decrease the likelihood of deadlock. Beyond providing a resting point for your transactions, you may want to use a null action to do light code tasks by taking advantage of the pre and postscript function. Consider a situation where you may want to propagate a modified version of a variable to the flow context, but the modifications are trivial. For example, you simply want to remove file extensions from the results of a File Exists trigger. The following pre or postscript would be able to accomplish the task:
List fileNames = (List) flowContext.get("filenames");
Iterator it = fileNames.iterator();
HashSet modFiles = new HashSet();
while(it.hasNext()){
String file = (String) it.next();
file = file.substring(0, file.lastIndexOf("."));
modFiles.add(file);
}
flowContext.put("filenames", modFiles);