if( !validateParameters() ) { throw new EngineException( MessageConstants.INVALID_PARAMETER_EXCEPTION ); }  EngineEmitterServices services = new EngineEmitterServices(this);  EngineConfig config = engine.getConfig(); if ( config != null ) services.setEmitterConfig(engine.getConfig().getEmitterConfigs());  services.setReportRunnable(runnable);   usingParameterValues();    executionContext.getConfigs().putAll(runnable.getTestConfig()); executionContext.getConfigs().putAll(System.getProperties());  ReportExecutor executor = new ReportExecutor(executionContext);   IContentEmitter emitter = new PageHintEmitter();  emitter = new HtmlPaginateEmitter(executor, emitter);   emitter.initialize(services);  try { Report report = new ReportParser().parse( ((ReportRunnable)runnable).getReport() ); executor.execute(report, emitter); } catch (Exception ex) { log.log(Level.SEVERE, "An error happened while running the report. Cause:", ex); } catch (OutOfMemoryError err) { log.log(Level.SEVERE, "An OutOfMemory error happened while running the report."); throw err; }
	public void run( IReportDocManager manager, String reportDocName )			throws EngineException	{		if( !validateParameters() )		{			throw new EngineException( MessageConstants.INVALID_PARAMETER_EXCEPTION ); //$NON-NLS-1$		}		//create the emitter services object that is needed in the emitters.		EngineEmitterServices services = new EngineEmitterServices(this);			EngineConfig config = engine.getConfig();		if ( config != null )			services.setEmitterConfig(engine.getConfig().getEmitterConfigs());				services.setReportRunnable(runnable);				//register default parameters		usingParameterValues();				//setup runtime configurations		//user defined configs are overload using system properties.		executionContext.getConfigs().putAll(runnable.getTestConfig());		executionContext.getConfigs().putAll(System.getProperties());				ReportExecutor executor = new ReportExecutor(executionContext);		//if we need do the paginate, do the paginate.		IContentEmitter emitter = new PageHintEmitter();				emitter = new HtmlPaginateEmitter(executor, emitter);				// emitter is not null		emitter.initialize(services);				try		{			Report report = new ReportParser().parse( ((ReportRunnable)runnable).getReport() );			executor.execute(report, emitter);		}		catch (Exception ex)		{			log.log(Level.SEVERE, "An error happened while running the report. Cause:", ex); //$NON-NLS-1$		}		catch (OutOfMemoryError err)		{			log.log(Level.SEVERE, "An OutOfMemory error happened while running the report."); //$NON-NLS-1$			throw err;		}			}