no-issue: Infer types in place of Class<T> on Steps interface#1223
Open
ricardozanini wants to merge 2 commits intoserverlessworkflow:mainfrom
Open
no-issue: Infer types in place of Class<T> on Steps interface#1223ricardozanini wants to merge 2 commits intoserverlessworkflow:mainfrom
Class<T> on Steps interface#1223ricardozanini wants to merge 2 commits intoserverlessworkflow:mainfrom
Conversation
Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the fluent Func DSL Step chaining API to infer lambda input types at runtime (instead of requiring Class<T> arguments), and adjusts executor tests to use the inferred-type overloads.
Changes:
- Update
Stepchaining methods (when,exportAs,outputAs,inputFrom) to useReflectionUtils.inferInputType(...)and pass inferred classes into the underlying builders. - Switch several
Stepoverloads to accept serializable functional interfaces to enableSerializedLambda-based inference. - Update data-flow transformation helper tests to remove explicit
Class<T>parameters and add explicit lambda parameter types where needed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| experimental/lambda/src/test/java/io/serverless/workflow/impl/executors/func/FuncDSLDataFlowTransformationHelpersTest.java | Updates tests to use inferred-type DSL overloads and explicitly typed lambda parameters for context-aware functions. |
| experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/Step.java | Adds runtime type inference for chained transformations/conditions and updates method signatures to use serializable functional interfaces. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/Step.java
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/Step.java
Show resolved
Hide resolved
| * | ||
| * @param <T> the task result type | ||
| * @param <V> the output type (what gets written to workflow data) | ||
| * @param <T> the task result typeßßß |
There was a problem hiding this comment.
There are stray characters in this Javadoc type parameter description (ßßß). This will show up in generated docs and should be removed.
Suggested change
| * @param <T> the task result typeßßß | |
| * @param <T> the task result type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
We missed the transformation interfaces inference on the other PR (#1219)
Special notes for reviewers:
Additional information (if needed):