Skip to content

fix #523 - feat: Integrate Serverless Workflow Editor package into DevUI#575

Open
fantonangeli wants to merge 19 commits into
quarkiverse:mainfrom
fantonangeli:issue-523-feat-Integrate-Serverless-Workflow-Editor-package-into-DevUI
Open

fix #523 - feat: Integrate Serverless Workflow Editor package into DevUI#575
fantonangeli wants to merge 19 commits into
quarkiverse:mainfrom
fantonangeli:issue-523-feat-Integrate-Serverless-Workflow-Editor-package-into-DevUI

Conversation

@fantonangeli

@fantonangeli fantonangeli commented May 29, 2026

Copy link
Copy Markdown
Member

Closes #523

Required PRs:

The problem

The goal is to replace the current Mermaid-based diagram visualization with the Serverless Workflow Diagram Editor component in the Quarkus Dev UI.

Quarkus Flow should not require pnpm, npm, or Node.js to build the Quarkus extension modules. Users should be able to add Quarkus Flow as a dependency and have the Dev UI work without any frontend setup.

Proposed solution / API

Consume @serverlessworkflow/diagram-editor directly through mvnpm, as a Maven-resolvable web dependency. Do not create a separate /editor module or a quarkus-flow-editor wrapper artifact.

This keeps the Quarkus extension build Maven-based and avoids introducing a separate editor artifact, nightly publishing, or additional GH Actions workflows.

How to test:

  • from Quarkus Flow:

    • mvn clean install -DskipTests
  • Run an example:

cd examples/suspend-resume-abort
#or this one to have multiple WFs
#cd examples/micrometer-prometheus
mvn clean quarkus:dev

Known issues:

Preview:

Deployment with multiple WFs:
https://github.com/user-attachments/assets/58f88dfa-2d3d-40bf-ab10-e1420a52e51a

Loading message for slow jsonRPC communication:
https://github.com/user-attachments/assets/c696e31c-8c2b-4711-8007-7b938711d559

@fantonangeli
fantonangeli requested a review from a team as a code owner May 29, 2026 11:10
@fantonangeli fantonangeli added the ⚠️ DO NOT MERGE DO NOT MERGE THIS PR! label May 29, 2026
@ricardozanini
ricardozanini marked this pull request as draft May 29, 2026 14:15
@fantonangeli

Copy link
Copy Markdown
Member Author

After a long investigation, it seems the React import issue was a bundling issue related to use-sync-external-store, similar to react/react#24590, where the library is built into the library bundle in a CJS form and later fails in ESM/browser consumers.

I found a way to keep use-sync-external-store external and declare it as a runtime dependency, letting Quarkus resolve it as ESM instead of CJS.

Currently I can see the Diagram Editor internal Error page.
I'm still refining my solution.
image

try {
const { result } = await this.jsonRpc.getWorkflowDefinition({ id: this.workflow.id });
this._workflowDefinition = JSON.stringify(result, null, 2);
this._workflowDefinition = workflowExample;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This line show a fixed WF example because the definition from the service seems not compatible with the typescript SDK.
You can comment this line to try.

@fantonangeli fantonangeli Jun 19, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This POM is only for PR reviewers until my fix on the Diagram Editor lands on a published version.
We can remove this file before merge this PR or after a new DE release.

@fantonangeli

Copy link
Copy Markdown
Member Author

I think I found a useful error from the SDK, which is hidden by another try..catch:

Error: 'Workflow' is invalid - The DSL version of the workflow '1.0.0' doesn't match the supported version of the SDK '1.0.3'.

and the value of document.dsl is 1.0.0.
For what I understand, it seems a DSL compatibility error

@fantonangeli

Copy link
Copy Markdown
Member Author

@fjtirado @lornakelly @ricardozanini @handreyrc I updated the PR description and now this is ready for review

Comment thread core/deployment/pom.xml Outdated
@ricardozanini

Copy link
Copy Markdown
Member

@fantonangeli can you do a new alpha editor release with the bugs fixed?

fantonangeli added a commit to fantonangeli/quarkus-flow that referenced this pull request Jun 30, 2026
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@ricardozanini
ricardozanini force-pushed the issue-523-feat-Integrate-Serverless-Workflow-Editor-package-into-DevUI branch from 1dc9b3b to 6ac35eb Compare June 30, 2026 14:08
…grate-Serverless-Workflow-Editor-package-into-DevUI

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…grate-Serverless-Workflow-Editor-package-into-DevUI

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…grate-Serverless-Workflow-Editor-package-into-DevUI

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@fantonangeli
fantonangeli marked this pull request as ready for review July 10, 2026 16:10

@ricardozanini ricardozanini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🎉

@ricardozanini ricardozanini removed the ⚠️ DO NOT MERGE DO NOT MERGE THIS PR! label Jul 10, 2026
…grate-Serverless-Workflow-Editor-package-into-DevUI

Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
@ricardozanini

Copy link
Copy Markdown
Member

@fantonangeli the CI errors are unrelated, I'm fixing on another PR.

@fantonangeli

Copy link
Copy Markdown
Member Author

I guess the Langchain4J failures are not related to this PR.
I published the @openworkflowspec/diagram-editor 0.2.0 and updated all the references here.
I would need one more review, @lornakelly can you please review this?

@ricardozanini

Copy link
Copy Markdown
Member

@fantonangeli can you rebase?

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: Integrate Serverless Workflow Editor package into DevUI

3 participants