Skip to content

Remove the application property to toggle TriggerMesh DWL integration #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 tasks
fabapp2 opened this issue Sep 23, 2022 · 0 comments
Closed
6 tasks
Labels
Milestone

Comments

@fabapp2
Copy link
Contributor

fabapp2 commented Sep 23, 2022

labels: ["type: enhancement","in: mule-3.9"]

What needs to be done

Currently, the support to generate code for TriggerMesh #434 integration when migrating from Mule 3.9 to Spring Boot can be toggled by setting the application property sbm.muleTriggerMeshTransformEnabled.

The behaviour should be changed as this property is more of a recipe/action configuration and should not be on application level.

Why it needs to be done

Instead of using Spring application properties to trigger the behaviour of JavaDslAction2, there should be two variants of the migrate-mule-to-boot recipe, one with TriggerMesh and one without. This would provide a simpler and cleaner user experience to chose different behaviour of a migration.

The problem is that with the current implementation DwlTransformTranslator is configurable to create TriggerMesh or "default" (hints) DWL translation by setting the sbm.muleTriggerMeshTransformEnabled flag.
With the current implementation this flag has to be passed through from the recipe declaration to the Translator to remove the need for the application property.

A solution could be:

  • Remove the application property
  • Provide a member in JavaDSLAction to keep the strategy (enum) for Dwl translation
  • Provide two Translators, one for TriggerMesh and one for previous, default DWL translation.
  • Refactor FlowTopLevelElementFactory.buildDefinition() to allow passing a strategy (replacing the flag) which defines which of the DwlTranslators gets added to the Map<Class, MuleComponentToSpringIntegrationDslTranslator> translatorsMap.
public TopLevelElement buildDefinition(JAXBElement topLevelElement, MuleConfigurations muleConfigurations, DwlTranslationStrategy dwlTranslationStrategy) {
 ...
}

factory.buildDefinition(element, muleConfigurations, DwlTranslationStrategy.TRIGGER_MESH)
  • Provide the strategy to the buildDefinition method
  • Move the class creation from JavaDSLAction2 into the TriggerMesh Dwl Transformer

Additional Information

@fabapp2 fabapp2 added type: enhancement New feature or request Mule-3.9 labels Sep 23, 2022
@fabapp2 fabapp2 added this to the v0.13.0 milestone Oct 18, 2022
@fabapp2 fabapp2 modified the milestones: v0.13.0, v0.14.0 Nov 22, 2022
@fabapp2 fabapp2 modified the milestones: v0.14.0, v0.15.0 Feb 21, 2023
@fabapp2 fabapp2 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
@fabapp2 fabapp2 added archived and removed type: enhancement New feature or request in: mule-3.9 labels Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant