{
if (i % 10 == 0)
processBean.updateLastDescription("Unpublished " + i + " pages");
String siteNodeIdString = siteNodeIds[i];
SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getLatestPublishedSiteNodeVersionVO(new Integer(siteNodeIdString));
SiteNodeVersionVO latestSiteNodeVersionVO = SiteNodeVersionController.getController().getLatestActiveSiteNodeVersionVO(siteNodeVersionVO.getSiteNodeId());
//SiteNodeVO siteNodeVO = siteNodeMap.get(siteNodeVersionVO.getId());
//if(siteNodeVO == null)
SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVersionVO.getSiteNodeId());
if(attemptDirectPublishing.equals("true"))
{
if(siteNodeVersionVO.getId().equals(latestSiteNodeVersionVO.getId()))
{
logger.info("Creating a new working version as there was no active working version left...");
SiteNodeVersionVO newSiteNodeVersionVO = SiteNodeStateController.getController().changeState(siteNodeVersionVO.getId(), siteNodeVO, SiteNodeVersionVO.WORKING_STATE, "new working version", false, this.getInfoGluePrincipal(), events);
siteNodeMap.put(newSiteNodeVersionVO.getId(), siteNodeVO);
}
}
EventVO eventVO = new EventVO();
eventVO.setDescription(this.versionComment);