Skip to content

Introduce input, output methods to FuncDSL#1197

Merged
fjtirado merged 1 commit intoserverlessworkflow:mainfrom
mcruzdev:issue-1196
Mar 6, 2026
Merged

Introduce input, output methods to FuncDSL#1197
fjtirado merged 1 commit intoserverlessworkflow:mainfrom
mcruzdev:issue-1196

Conversation

@mcruzdev
Copy link
Collaborator

@mcruzdev mcruzdev commented Mar 3, 2026

This pull request add input and output methods to DSL.

Closes #1196

Copilot AI review requested due to automatic review settings March 3, 2026 03:17
@mcruzdev mcruzdev requested a review from fjtirado as a code owner March 3, 2026 03:17
@mcruzdev mcruzdev requested a review from ricardozanini March 3, 2026 03:18
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

Adds DSL helpers to simplify enriching inputFrom(...) and outputAs(...) transformations with access to the root workflow input (WorkflowModel), addressing #1196 by reducing boilerplate when reading workflowContext.instanceData().input().

Changes:

  • Added FuncDSL.enriched(...) and FuncDSL.enrichedOutput(...) helper functions (including root-input-only variants).
  • Introduced EnrichWithModelBiFunction functional interface to support (typedValue, WorkflowModel) enrichment lambdas.
  • Added new integration-style tests and updated impl/test Maven dependencies to compile/run them.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java Adds new enrichment helpers and their Javadocs.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/EnrichWithModelBiFunction.java New functional interface for enrichment with WorkflowModel.
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java New tests covering enriched input/output scenarios.
impl/test/pom.xml Adds test-scope dependencies required by the new tests.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/Step.java Minor formatting-only changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 3, 2026 12:40
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

Looks good, but please consider renaming to enrich instead and fwiw: https://www.enterpriseintegrationpatterns.com/patterns/messaging/DataEnricher.html

Copilot AI review requested due to automatic review settings March 3, 2026 18:30
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 3, 2026 20:26
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 3, 2026 21: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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 3, 2026 21:51
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mcruzdev mcruzdev changed the title Add enriched and enrichedOutput DSL functions Add enrichInput and enrichOutput DSL functions Mar 4, 2026
@fjtirado
Copy link
Collaborator

fjtirado commented Mar 4, 2026

See my comment on the issue, I think the PR needs to be refactor accordingly

@fjtirado fjtirado marked this pull request as draft March 4, 2026 12:59
@mcruzdev mcruzdev marked this pull request as ready for review March 4, 2026 16:56
Copilot AI review requested due to automatic review settings March 4, 2026 16:56
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 4, 2026 17:14
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 4, 2026 17:23
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 4, 2026 19:07
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

LGTM, there's just one minor comment from copilot that should be addressed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should not include experimental dependencies into an impl module
Those two test should be moved to test folder on experimental-lambda

Copy link
Collaborator

@fjtirado fjtirado left a comment

Choose a reason for hiding this comment

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

Move test to lambda module to avoid dependency between impl and experimental

Copilot AI review requested due to automatic review settings March 6, 2026 16:54
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mcruzdev mcruzdev changed the title Introduce taskInput, taskOutput and workflowInput methods Introduce input, output methods to FuncDSL Mar 6, 2026
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
@mcruzdev
Copy link
Collaborator Author

mcruzdev commented Mar 6, 2026

Done @fjtirado

@fjtirado fjtirado merged commit dfc5696 into serverlessworkflow:main Mar 6, 2026
3 checks passed
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.

Add outputAs|inputFrom(WorkflowModel workflowInput) method to DSL

4 participants