ProcessInstanceRemote[] pirs = new ProcessInstanceRemote[instances.size()];
int i=0;
for(Iterator iter = instances.iterator(); iter.hasNext();){
ProcessInstanceRepositoryLocal pirl = (ProcessInstanceRepositoryLocal)iter.next();
pirs[i] = new ProcessInstanceRemote(pirl);
/*pirs[i].setId(pirl.getId().toString());
pirs[i].setStatus(pirl.getStatus());*/
i++;
}