Skip to content
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

Kotlin dsl- add transform methd for GenericTransformer #3288

Closed
tomiasko opened this issue May 21, 2020 · 0 comments · Fixed by #3291
Closed

Kotlin dsl- add transform methd for GenericTransformer #3288

tomiasko opened this issue May 21, 2020 · 0 comments · Fixed by #3291

Comments

@tomiasko
Copy link

Add ability to kotlin dsl to add a generic transformer to a flow without specifiing method to be called.

When i wanted to use UnZipTransformer() i added it to a flow:

...
transform(
    UnZipTransformer()
)
...

It ended up with error:

java.lang.IllegalArgumentException: Found ambiguous parameter type [class java.lang.Boolean] for method match: [public void org.springframework.integration.zip.transformer.AbstractZipTransformer.setZipResultType(org.springframework.integration.zip.transformer.ZipResultType)

I had to specify exacltly what method of UnZipTransformer to call one way or another.

It would be nice to use Transformer without specifying explicitly to use its transform method as is possible using java dsl.

I am creating this ticket following gitter discussion with @artembilan

@tomiasko tomiasko added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels May 21, 2020
@artembilan artembilan added in: dsl and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels May 22, 2020
@artembilan artembilan added this to the 5.4 M1 milestone May 22, 2020
@artembilan artembilan self-assigned this May 27, 2020
artembilan added a commit to artembilan/spring-integration that referenced this issue May 27, 2020
Fixes spring-projects#3288

* For better end-user experience with Kotlin DSL and get a gain from
existing `Transformer` implementations add a `transform(Transformer)`
EI-method into the `KotlinIntegrationFlowDefinition`
* Also add `filter(MessageSelector)` for any out-of-the-box `MessageSelector`

**Cherry-pick to 5.3.x**
garyrussell pushed a commit that referenced this issue May 27, 2020
Fixes #3288

* For better end-user experience with Kotlin DSL and get a gain from
existing `Transformer` implementations add a `transform(Transformer)`
EI-method into the `KotlinIntegrationFlowDefinition`
* Also add `filter(MessageSelector)` for any out-of-the-box `MessageSelector`

**Cherry-pick to 5.3.x**
garyrussell pushed a commit that referenced this issue May 27, 2020
Fixes #3288

* For better end-user experience with Kotlin DSL and get a gain from
existing `Transformer` implementations add a `transform(Transformer)`
EI-method into the `KotlinIntegrationFlowDefinition`
* Also add `filter(MessageSelector)` for any out-of-the-box `MessageSelector`

**Cherry-pick to 5.3.x**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants