CRM-16357 - refactor postProcess into a submit function for testability