private InvoiceRenderingOutput renderInvoice()
throws IOException, FailedToRenderException {
InvoiceCreationOutput creationOutput = (InvoiceCreationOutput) getOutput();
InvoiceCreationInput creationInput = (InvoiceCreationInput)getInput();
InvoiceRenderingInput renderingInput =
new InvoiceRenderingInput(creationOutput.getGeneratedInvoiceType());
renderingInput.initFromInvoiceCreationInput(creationInput);
renderingInput.setInvoiceToBeRendered(creationOutput.getGeneratedInvoiceType());
InvoiceRenderingTask renderingTask = new InvoiceRenderingTask();
return (InvoiceRenderingOutput) renderingTask.execute(renderingInput);
}