private void copyToVarInstances(ProcessInstance pi) throws ExedoException {
for (Iterator it = pi.getProcessTemplate().retrievePtVars().iterator(); it
.hasNext();) {
PTVar ptVar = (PTVar) it.next();
VarInstance vi = new VarInstance();
vi.setPtVarUid(ptVar.getObjUid());
vi.setProcessInstance(pi);
vi.setVarName(ptVar.getVarName());
DAOUtil.BUSI().store(vi);
}
}