To get the content out of the task you should use:
long contentId = task.getTaskData().getDocumentContentId();
if (contentId != -1) {
BlockingGetContentResponseHandler responseHandler = new BlockingGetContentResponseHandler();
client.getContent(contentId, responseHandler);
Content content = responseHandler.getContent();
input = ContentMarshallerHelper.unmarshall(content.getContent(), null);
}
HTH