Skip to content

feat: Implement FuncDoTaskBuilder to also cover raise and tryCatch#1322

Open
matheusandre1 wants to merge 1 commit intoserverlessworkflow:mainfrom
matheusandre1:feature/1304
Open

feat: Implement FuncDoTaskBuilder to also cover raise and tryCatch#1322
matheusandre1 wants to merge 1 commit intoserverlessworkflow:mainfrom
matheusandre1:feature/1304

Conversation

@matheusandre1
Copy link
Copy Markdown
Contributor

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it: draft to Closes: #1304

Special notes for reviewers:

Additional information (if needed):

@matheusandre1
Copy link
Copy Markdown
Contributor Author

take a look, @domhanak....

@mcruzdev
Copy link
Copy Markdown
Collaborator

mcruzdev commented Apr 21, 2026

Hi @matheusandre1 is this ready for review?

@matheusandre1 matheusandre1 marked this pull request as ready for review April 21, 2026 04:01
@matheusandre1 matheusandre1 requested a review from fjtirado as a code owner April 21, 2026 04:01
Copilot AI review requested due to automatic review settings April 21, 2026 04:01
Copy link
Copy Markdown
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 extends the experimental FuncWorkflowBuilder / FuncDoTaskBuilder fluent API so function-based workflows can include raise() and tryCatch() tasks (per #1304), avoiding the need to fall back to JQ for these constructs.

Changes:

  • Add raise(...) and tryCatch(...) support to the func “do” fluent surface (FuncDoFluent, FuncDoTaskBuilder, FuncTaskItemListBuilder) and provide matching FuncDSL helpers.
  • Introduce FuncRaiseTaskBuilder and FuncTryTaskBuilder to build the corresponding spec task structures.
  • Add a JUnit test validating raise and try/catch compilation through FuncWorkflowBuilder.

Reviewed changes

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

Show a summary per file
File Description
experimental/fluent/func/src/test/java/io/serverlessworkflow/fluent/func/FuncDSLTest.java Adds coverage ensuring raise and tryCatch tasks are emitted correctly via FuncWorkflowBuilder.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/spi/FuncDoFluent.java Extends the func “do” fluent interface to include raise and try/catch task fluent APIs.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java Adds FuncDSL.raise(...) and FuncDSL.tryCatch(...) task configurer helpers.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncTryTaskBuilder.java New builder for try/catch tasks (try handler + catch handler + retry/errors/backoff helpers).
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncTaskItemListBuilder.java Implements list-level raise and tryCatch task appenders.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncRaiseTaskBuilder.java New builder for raise tasks.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncDoTaskBuilder.java Wires raise and tryCatch through the workflow “do” builder to the underlying list builder.

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

Signed-off-by: Matheus Andre <matheusandr2@gmail.com>
Signed-off-by: Matheus André <matheusandr2@gmail.com>
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.

feat: Implement FuncDoTaskBuilder to also cover raise() and tryCatch()

3 participants