restoreState = fallBackState;
if (isInRollBackMode == false)
{
if (pageEventCount >= AbstractReportProcessor.COMMIT_RATE)
{
final OutputFunction outputFunction = state.getLayoutProcess().getOutputFunction();
if (outputFunction.createRollbackInformation())
{
if (AbstractReportProcessor.SHOW_ROLLBACKS)
{
logger.debug("Print: Try to generate new fallback state after commit count reached: " + state.getProcessKey());
}
realFallbackState = state.deriveForPagebreak();
}
else
{
realFallbackState = null;
}
}
}
}
else
{
restoreState = null;
}
final ProcessState nextState = state.advance();
state.setErrorHandler(IgnoreEverythingReportErrorHandler.INSTANCE);
state = nextState;
final ReportStateKey nextStateKey = state.getProcessKey();
if (errorHandler.isErrorOccured() == true)
{
final List childExceptions = Arrays.asList(errorHandler.getErrors());
errorHandler.clearErrors();
if (failOnError)
{
throw new ReportEventException("Failed to dispatch an event.", childExceptions);
}
else
{
final ReportEventException exception =
new ReportEventException("Failed to dispatch an event.", childExceptions);
AbstractReportProcessor.logger.error("Failed to dispatch an event.", exception);
}
}
if (state.isArtifcialState())
{
if (AbstractReportProcessor.SHOW_ROLLBACKS)
{
logger.debug("Print: Silent commit as we are in an artificial state: " + state.getProcessKey());
}
state = state.commit();
if (AbstractReportProcessor.SHOW_ROLLBACKS)
{
logger.debug("Print: Post Silent commit as we are in an artificial state: " + state.getProcessKey());
}
continue;
}
final OutputFunction outputFunction = state.getLayoutProcess().getOutputFunction();
if (outputFunction instanceof DefaultOutputFunction == false)
{
if (AbstractReportProcessor.SHOW_ROLLBACKS)
{
logger.debug("Print: Silent commit as we are have no access to the renderer: " + state.getProcessKey());