Closed ThorbenLindhauer closed 1 year ago
This comment was imported from JIRA and written by user @koevskinikola
Hi Q2R5dDB,
Thanks for raising this topic.
I think we introduced some changes to Spin that made it possible to pass multiple instances of the DataFormatConfiguratior interface, but I have to re-check the code to confirm.
I'll provide you with more information next week.
Best, Nikola
This comment was imported from JIRA and written by user @koevskinikola
Hi Q2R5dDB,
Sorry for the long delay with this response. I believe that something similar to what you require has already been implemented.
The SpinProcessEnginePlugin
class is extended into the SpringBootSpinProcessEnginePlugin class and you can provide an optional list of DataFormatConfiguratior implementations with the DataFormats.loadDataFormats(Classloader, List<DataFormatConfigurator>)
static method.
A bean of this class is then provided here: https://github.com/camunda/camunda-bpm-platform/blob/f5c2d559dd4016de4438bdb9c58222059a988b53/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/CamundaBpmPluginConfiguration.java#L96
Would you be able to work with this?
Best, Nikola
It looks like Nikolas's solution works for the user, and the feature is already part of the product. As a result of this, I'm closing this issue.
This issue was imported from JIRA:
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.User Story (Required on creation):
I use spin/jackson to serialize and deserialize complex process variables. I use spring boot. My jackson object mapper has a specific configuration of modules, mixins, ... I expose this mapper as singleton spring bean and inject it in any component that requires json. Works great.
But: I cannot register my jackson object mapper instance in the camunda spin plugin. I have to provide a service loader, a dataFormatConfigurator interface implementation and provide static access to (a copy of) my singleton objectMapper.
What I want to do: Provide a SpinPlugin bean in my spring context that gets my object mapper injected and registers a dataFormatConfigurator based on that mapper.
Functional Requirements (Required before implementation):
Technical Requirements (Required before implementation):
Extend the SpinProcessEnginePlugin so it accepts an optional list of dataFormatConfigurators. If configurators are passed they are used (in addition to the service loader spi) to configure the DataFormats.INSTANCE. The methods already exist, just the constructor and the preInit() method of the plugin have to be extended.
Hint:
I already did this locally by extending the plugin class and overwriting preInit(), but I would like to see this in the core to a) avoid additional implementation and b) avoid copying code fragments that might change in the core (call of super.preInit() did not work, had to copy the method.
I would provide a PR for this. It is a personal feature request by me as community member.
Links: