Restricting timer event execution in a shared environment

We have multiple embedded engines running against a shared database. All is well except for processes containing a timer event in that execution may occur within any instance versus linked to a specific instance.

I see that this might be solved by using a databaseTablePrefix or setting jobExecutorDeploymentAware to true but the impact of these options may be too much at this time. In other words, these may be good long term solutions but for now we are looking to handle this with minimal changes to the current deployment/environment.

An approach I am currently testing is using a custom AcquireJobsCmd to restrict jobs by tenant id.

Does anyone have a better option?

Thanks,

David

Hi @DDB,

please describe the problems you have with timer events in your scenario.

Do you have a homogenous or heterogenous cluster?

Best regards,
Philipp

Hello Philipp,

Eventually we will move to a homogenous cluster but currently the process engine is embedded in a spring boot application and we are running two instances of the application with a shared database. The problem is application A’s workflows may be processed by the process engine running in application B.

Using databaseTablePrefix or setting jobExecutorDeploymentAware to true appears to be the preferred solutions but these require additional changes that will impact our release schedule. Since posting this I was able to customize the job acquisition method to filter by tenant id. It’s a bit heavy handed but it works so we will run with it until the next release (clustered environment).

Thank you for your interest.

David

Hi David,

it seems that you have a heterogeneous cluster. In this case, you have to activate the jobExecutorDeploymentAware. This should lead to no additional changes. It’s an update of the process engine configuration.

Best regards,
Philipp

Did the jobExecutorDeploymentAware solved the problem ? We have an exact same issue .