Flowable Process Engine REST API & Spring interceptors


Working with Flowable 6.3.1.

I have exposed Flowable Process Engine REST API by including the flowable-spring-boot-starter-process-rest dependency in my Spring Boot application.
Also, I have changed the context path via the flowable.process.servlet.path property and have secured all endpoints via custom ResourceServerConfigurerAdapter.

Everything works great until here.

Now I want to create a Spring interceptor that will be called before the Flowable REST endpoints. No matter how I configure the interceptor (even when configured to intercept all endpoints), it does not intercept Process Engine REST API calls.

Do you have any idea why the setup might not be working?
Anybody with working example?


What do you mean with a custom ResourceServerConfigurerAdapter?

What exactly is your interceptor doing? I suppose that your interceptor might not be called because the REST endpoints are in a child context. Have a look at ProcessEngineRestApiConfiguration in the RestApiAutoConfiguration. Maybe we need to make that servlet registration conditional so people can register a custom logic.


Thanks for the response.

After looking at the classes, my suggestion is that the problem comes from the new DispatcherServlet that is being created. My interceptors are registered with the default DispatcherServlet.

I am able to intercept the calls to the REST API via plain Filters (as they get executed before DispatcherServlet). But wanted to know if there is a way to do it with Interceptors as well.

Otherwise - I need to intercept the calls in order to make additional security checks.


Hey Snezhana,

Won’t my previous proposal work for you? If you are able to customize the registration of the servlet?

Not sure what kind of checks you need to do, but maybe you need to look at the new (on master) XXXRestApiInterceptor(s).