class ResultProcessor {

    public void process(ProcessSession session, ComponentLog logger, FlowFile updated, Exception exception, String name) {
        updated = session.putAttribute(updated, CoreAttributes.FILENAME.key(), name);
        updated = session.putAttribute(updated, CoreAttributes.MIME_TYPE.key(), MediaType.APPLICATION_XML_UTF_8.toString());
        if (exception == null) {
            session.transfer(updated, successRelationship);
        } else {
            logger.error(UNABLE_TO_PROCESS_DUE_TO, new Object[]{name, exception}, exception);
            session.transfer(updated, failureRelationship);
        }
    }

    public  ResultProcessor(Relationship successRelationship, Relationship failureRelationship);

}