feat: Implement FuncDoTaskBuilder to also cover raise and tryCatch#1322
Open
matheusandre1 wants to merge 1 commit intoserverlessworkflow:mainfrom
Open
feat: Implement FuncDoTaskBuilder to also cover raise and tryCatch#1322matheusandre1 wants to merge 1 commit intoserverlessworkflow:mainfrom
matheusandre1 wants to merge 1 commit intoserverlessworkflow:mainfrom
Conversation
Contributor
Author
|
take a look, @domhanak.... |
Collaborator
|
Hi @matheusandre1 is this ready for review? |
Contributor
There was a problem hiding this comment.
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(...)andtryCatch(...)support to the func “do” fluent surface (FuncDoFluent,FuncDoTaskBuilder,FuncTaskItemListBuilder) and provide matchingFuncDSLhelpers. - Introduce
FuncRaiseTaskBuilderandFuncTryTaskBuilderto build the corresponding spec task structures. - Add a JUnit test validating
raiseandtry/catchcompilation throughFuncWorkflowBuilder.
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>
cc8dd6f to
4ea02b7
Compare
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: draft to Closes: #1304
Special notes for reviewers:
Additional information (if needed):