camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.09k stars 1.54k forks source link

Allow overwriting beans in CamundaBpmAutoConfiguration #2756

Open ThorbenLindhauer opened 2 years ago

ThorbenLindhauer commented 2 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-14784
Reporter XOqoNX7
What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.
Has restricted visibility comments true

User Story (Required on creation):

Hi,

The following issue is about a code part in the Camunda Spring Boot Starter.

We are using custom ApplicationEvent_ in our application to control certain lifecycle aspects during the startup. This means also that we have some subsequent migrations regarding Camunda. This migration is executed after a certain event has been published. Unfortunately, Camunda already starts on the ApplicationReadyEvent (as can be seen in the {}ProcessApplicationEventPublisher{}), which is too early for us. In order to give developers more control, it would be sufficient if one could at least overwrite the beans in the CamundaBpmAutoConfiguration without using something like the {_}spring.main.allow-bean-definition-overriding{}-Setting.

It would thus be very useful if the beans in the CamundaBpmAutoConfiguration  would be marked with {}ConditionalOnMissingBean{}. This would allow easy and clean "overring" of the beans in question with custom logic.

Functional Requirements (Required before implementation):

Technical Requirements (Required before implementation):

Limitations of Scope (Optional):

Hints (optional):

Links:

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user @koevskinikola


Hi XOqoNX7,

Thank you for raising this feature request.

Best, Nikola

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user XOqoNX7

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Hi Nikola,

I modified the description accordingly.

I also created a demo application for the issue: https://github.com/nils-christian/CAM-14784. Our only possibility (without the mentioned allow-bean-override-property) at the moment is to disable the Camunda auto configuration completely and replace it with a customized version.

Best regards

  Nils

ThorbenLindhauer commented 1 year ago

This comment was imported from JIRA and written by user @koevskinikola


Hi XOqoNX7,

Thank you for the explanation and the example project. This seems like a valid feature request to me. I'll forward it for a decision and possible scheduling.

However, this ticket might not be scheduled due to a lack of development time. So I would encourage you to make a code contribution by submitting a pull request.

Best, Nikola

ThorbenLindhauer commented 1 year ago

This comment was imported from JIRA and written by user @tmetzke


Hi XOqoNX7,

thanks for this proposal, I agree with Nikola here that this makes total sense in the scope of the product and would be a nice enhancement of the Starter. (y)

We will move this to our backlog and consider it in the next planning sessions. That being said, we cannot yet say if we will work on this in the near future. If you want to speed up the process, feel free to make a contribution.

We'll update the ticket with any related progress and decisions.

Best, Tobias