subInputRepository = inputRepository.openInputRepository(source);
output = nameGenerator.generateStorageName("Object", null);
subOutputRepository = outputRepository.openOutputRepository(output, PentahoReportEngineMetaData.OPENDOCUMENT_CHART);
try {
final PentahoReportEngine engine = new PentahoReportEngine();
final ReportJobDefinition definition = engine.createJobDefinition();
final JobProperties procParms = definition.getProcessingParameters();
procParms.setProperty(ReportEngineParameterNames.INPUT_REPOSITORY, subInputRepository);
procParms.setProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY, subOutputRepository);
procParms.setProperty(ReportEngineParameterNames.INPUT_NAME, "content.xml");
procParms.setProperty(ReportEngineParameterNames.OUTPUT_NAME, "content.xml");
procParms.setProperty(ReportEngineParameterNames.CONTENT_TYPE, PentahoReportEngineMetaData.OPENDOCUMENT_CHART);
procParms.setProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY, dataSourceFactory);
procParms.setProperty(ReportEngineParameterNames.INPUT_MASTER_COLUMNS, masterColumns);
procParms.setProperty(ReportEngineParameterNames.INPUT_MASTER_VALUES, masterValues);
procParms.setProperty(ReportEngineParameterNames.INPUT_DETAIL_COLUMNS, detailColumns);
procParms.setProperty(ReportEngineParameterNames.IMAGE_SERVICE, imageService);
procParms.setProperty(ReportEngineParameterNames.MAXROWS, maxRows);
engine.createJob(definition).execute();
} catch (ReportExecutionException ex) {
LOGGER.error("ReportProcessing failed", ex);
} catch (IOException ex) {
LOGGER.error("ReportProcessing failed", ex);
}