while (it.hasNext()) {
WfActivity a = (WfActivity)it.next();
try {
// Due to concurrency, an activity
// could be started interim.
if (!a.workflowState()
.equals(State.CLOSED)
&& a.state()
.equals("open.not_running.not_runnable")) {
a.setProcessContext(null);
}