Problem on task execution after stop/start process engine using flowable 6.6.0

After upgrading from flowable 6.4.2 to 6.6.0 we experiencing a problem with execution of asynchronous task after stop and start of process engine.

We use an override on the ProcessEngineConfigurationImpl class in which we use AsyncTaskExecutor­­­­­­­ asyncTaskExecutor to execute tasks asynchronously, for instance to send mail on a certain moment. The object asyncTaskExecutor has a field executorService which performs the real execution. If the processEngine is stopped (via the ProcessEngineFactoryBean.stopService()) then the field asyncTaskExecutor. executorService is nullified.

If the service is started again the asyncTaskExecutor is not initialized again, so the field asyncTaskExecutor. executorService is still null leading to a null point exception when, after the start of the service, a pending event is executed.

Is this a bug? Should it be repaired in such a way that when the service is restarted after a stop, and asyncTaskExecutor. executorService is null it is reinitialized again? Or alternatively the a new asyncTaskExecutor is created and initialized.

Is it a bug, or are we using the process engine in an incorrect way?