The 2 normal ways to build a ProcessEngine is through a ProcessEngineBuilder (Activiti without spring) or with a ProcessEngineFactoryBean (Spring).
At this time, we don't have a lot of things that can be configured in the configuration files (either activiti.cfg.xml or your-spring-context.xml)
However, if you know what you're doing and you want to tweak the ProcessEngineConfiguration programatically,
In the activity wihtout spring case, you have to extend the ProcesEngineBuilder and override the default constructor. There you can tweak the protected memberfield processEngineConfiguration.
Similar, in the Spring case, the best strategy is to extend the spring ProcessEngineFactoryBean and tweak the processEngineConfiguration member field.