docs: add Java example for invoking subflows#432
docs: add Java example for invoking subflows#432tanmaykadam1533 wants to merge 1 commit intoquarkiverse:mainfrom
Conversation
|
Hi maintainers 👋 This PR adds a Java DSL example for the "Invoking Subflows" section by converting the existing YAML example into a tabbed format (YAML + Java). The change is documentation-only and follows the existing format used in other sections. Please let me know if any changes are needed. Thanks! |
|
Hi @tanmaykadam1533, many thanks for your contribution! You actually made a good point with this PR by adding a Java DSL example with the YAML version on the same doc. @domhanak is currently working on the Java DSL part here: #393. Having said that, I'd like to hear from others about the possibility of having the Java and YAML DSL on the same page rather on separated one. I found it very useful to see both implementations together, so users can understand the slight difference between one and the other. |
@domhanak @ricardozanini I do not know till which point we are duplicating test already present in the SDK. Maybe we should add Fluent DSL counterparts to the YAMLs being tested here. See my comment here |
|
Thanks for the feedback! I agree that having both Java and YAML DSL together improves understanding. Please let me know if I should modify this PR or align it with the other work. |
The idea is to run the workflows on the Quarkus Flow context. The examples from the cookbook come from the official specification repository. |
Don't need to do anything now. Since @domhanak is coordinating the Java DSL testing/docs I'd like to hear from him first which approach he'd like to take. |
|
Hello all, thanks for the quick PR. But I got lost here. The FuncWorkflowBuilder that I have here do not have newWorkflow() method :D What am I missing? |
I haven't reviewed this yet. Actually, we are missing this shortcut in the public static TasksConfigurer workflow(WorkflowConfigurer configurer) {
return list -> list.workflow(configurer);
}It should work for the @tanmaykadam1533, have you tested the example you added to the docs? We don't have a |
|
Created: serverlessworkflow/sdk-java#1295 |
|
Thanks for the feedback! I'll check the sdk-java#1295 issue |
|
Feel free to add this here, I can consolidate it into the |
|
@domhanak your preference is to split Java DSL from YAML one? |

Description
Adds a Java DSL example for the "Invoking Subflows" section in the cookbook.
Previously, this section only included a YAML example. This PR converts it into a tabbed format (YAML + Java) and adds a corresponding Java DSL implementation using FuncWorkflowBuilder.
Fixes #428
Changes
Testing
Test Plan
Manual Testing
Checklist
Before submitting this PR, please ensure:
Additional Notes
This change improves developer experience by providing a Java DSL equivalent for subflow invocation.