feat: add sub worflows run on FuncDSL #1295#1299
feat: add sub worflows run on FuncDSL #1295#1299matheusandre1 wants to merge 1 commit intoserverlessworkflow:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for running nested/sub workflows (“run workflow” tasks) from the Func fluent DSL, closing #1295.
Changes:
- Extend Func FuncDo fluent interfaces/builders to include
WorkflowFluentso workflow tasks can be added from Func DSL chains - Add
FuncDSL.workflow(WorkflowConfigurer)helper to append workflow subflow tasks - Add a JUnit test validating the generated
RunWorkflowstructure andawait(false)propagation
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| experimental/fluent/func/src/test/java/io/serverlessworkflow/fluent/func/FuncDSLTest.java | Adds a test covering building a workflow task via Func DSL and verifying the produced RunWorkflow fields. |
| experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/spi/FuncDoFluent.java | Extends Func DSL fluent surface to include workflow tasks (WorkflowFluent). |
| experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java | Introduces FuncDSL.workflow(WorkflowConfigurer) task configurer entrypoint. |
| experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncTaskItemListBuilder.java | Implements workflow task addition for Func task lists by delegating to spec TaskItemListBuilder. |
| experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/FuncDoTaskBuilder.java | Wires workflow(...) into the Func do task builder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fjtirado
left a comment
There was a problem hiding this comment.
I think this needs some reworking
|
@matheusandre1 I fixed a problem with the subflow input, which is optiona and was throwing a null pointer |
7f053c4 to
8fd32b7
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8fd32b7 to
f5f4a50
Compare
f5f4a50 to
475d67b
Compare
475d67b to
e431e0a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
experimental/fluent/func/src/test/java/io/serverlessworkflow/fluent/func/FuncDSLTest.java:35
- There are unused static imports (
subflow,workflow) and an unused assertion import (assertFalse) in this test. In Java, unused imports fail compilation, so this needs to be removed or the file should add assertions/tests that actually use them (e.g., a test that exercises the new subflow/workflow APIs).
import static io.serverlessworkflow.fluent.func.dsl.FuncDSL.switchWhenOrElse;
import static io.serverlessworkflow.fluent.func.dsl.FuncDSL.toOne;
import static io.serverlessworkflow.fluent.spec.dsl.DSL.use;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import io.serverlessworkflow.api.types.CallHTTP;
import io.serverlessworkflow.api.types.Export;
💡 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>
e431e0a to
ebb589f
Compare
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it: Closes: #1295
Special notes for reviewers:
Additional information (if needed):