Extending command behaviour with command interceptors

The AbstractEngineConfiguration contains accessors for the customPostCommandInterceptors property. This abstract class is part of org.flowable.common.engine.impl whereas CmmnEngineConfiguration is part of org.flowable.cmmn.engine.

To my knowledge, this way of extending the engine is not documented (neither in the guides nor in Javadocs). Is it safe to use it in terms of maintainability when a new version is released?

Hey @jorge.mora,

CommandInterceptor is part of the impl package and thus it is considered as an implementation detail (like all other classes in the impl packages). We cannot give the same guarantees to such classes as the ones in the API packages. Using CommandInterceptor is also extremely low level, and we can’t commit to same rules as with the API packages.

What is your use case such that you need to use a low level classes such as the CommandInterceptor? Surely, there must be a way to achieve what you need through another way.

Cheers,
Filip

Hi Filip,

That’s what I thought… Thanks for confirming. I asked just because the configuration is available. But I understand that once you hit an impl package… implementation can change. :+1:

The use case is to do some post processing on PlanItemInstanceQuery commands to evaluate expressions contained in certain variables and create new variables for the response with the result of the expression evaluation.

Regards,
Jorge.