Business logic belongs in the model not the controller.

All this should be in a method on JobRecord. Something like job.sendToDocworks().