highmed / highmed-dsf

HiGHmed Data Sharing Framework funded by the German Federal Ministry of Education and Research (BMBF, grant ids: 01ZZ1802E and 01ZZ1802A)
Apache License 2.0
32 stars 20 forks source link

Add Option for Process Specific Spring Context #262

Open hhund opened 3 years ago

hhund commented 3 years ago

We should add an option to configure which spring beans are needed for with process inside a process plugin. Some of the configured beans might only be needed by specific processes and initializing them, while the specific process is excluded and not configured might make configuration more complex.

One option could be to use Spring profiles with a name that corresponds to the process name. If no profile is defined the bean would be active by default, if a profile is defined, the bean would only be active if a process with the same name is active as well.

hhund commented 3 years ago

The logic deciding which process to activate or not is run after the spring application contexts for the process plugins are initialized since java delegate classes are needed during process deployment by the camunda bpe. Implementing #262 may not be possible. Implementing #261 should allow process plugins to run custom logic after the plugins has been deployed and the state of a specific process from a process plugin is known.