Skip to content

no-issue: Infer types in place of Class<T> on Steps interface#1223

Open
ricardozanini wants to merge 2 commits intoserverlessworkflow:mainfrom
ricardozanini:missing-class-steps
Open

no-issue: Infer types in place of Class<T> on Steps interface#1223
ricardozanini wants to merge 2 commits intoserverlessworkflow:mainfrom
ricardozanini:missing-class-steps

Conversation

@ricardozanini
Copy link
Member

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):

Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
@ricardozanini ricardozanini requested a review from fjtirado as a code owner March 10, 2026 20:06
Copilot AI review requested due to automatic review settings March 10, 2026 20:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Step chaining methods (when, exportAs, outputAs, inputFrom) to use ReflectionUtils.inferInputType(...) and pass inferred classes into the underlying builders.
  • Switch several Step overloads to accept serializable functional interfaces to enable SerializedLambda-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.

*
* @param <T> the task result type
* @param <V> the output type (what gets written to workflow data)
* @param <T> the task result typeßßß
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants