Building automation into existing business processes