Use Context.getProcessEngineConfiguration 

in preference to casting execution.getEngineServices().