We use the Mocks class very often to register named bean instances on the process engine to be used within Expressions.
Mocks.register("myBean", new ByBean());
allows to write
Without having Spring, CDI or other bean managers in place.
Typical Use Cases:
- Test cases & Mocking (that gave it the name originally).
- Easy applications without Spring or CDI (e.g. if you use .NET but want to have simple engine plugins).
So my proposal is to extend the scope of this issue slightly:
1. add the MocksExpressionManager to every ProcessEngineConfiguration by default (currently you have to do this yourself). It does not do any harm if there! Then you can just start registrering own beans.
2. Test it
3. Document it properly in the user guide for the different use cases (especially testing)