You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "kbowers-ibm (via GitHub)" <gi...@apache.org> on 2026/04/27 11:55:22 UTC
[PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
kbowers-ibm opened a new pull request, #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555
This PR fixes the following bugs in the BPMN Editor epic: https://github.com/apache/incubator-kie-issues/issues/1933
- [bug] BPMN Editor: Message start event with a message is not generating an itemDefinition
- [bug] BPMN Editor: Correlation Key and Subscription not cleaned up after deletion
- [bug] BPMN Editor: Message Start Event-itemDefinition Not Assigning Value to structureRef
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "kbowers-ibm (via GitHub)" <gi...@apache.org>.
kbowers-ibm commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4564106735
Regarding __messageItemDefinition, its primary purpose is to reduce XML bloat.
In the old editor, every message gets its own itemDefinition using the format ${messageName}Type. That itemDefinition is then linked to a data type via the structureRef property whenever the message's data mapping is changed.
In the new editor, all messages are assigned a shared messageItemDefinition by default. When a message's data mapping is updated, the message is linked directly to the appropriate itemDefinition instead which has the appropriate type in it's structureRef already.
This approach is more consistent with the BPMN specification, since messages should reference the ID of the target itemDefinition, which is expected to be unique. In contrast, the ${messageName}Type pattern used by the old editor does not guarantee uniqueness and can result in unnecessary duplication of itemDefinition elements.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4505477424
minor thing
<img width="1228" height="233" alt="image" src="https://github.com/user-attachments/assets/be690bdb-be1c-4e1b-ad58-c0f272813de1" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "thiagoelg (via GitHub)" <gi...@apache.org>.
thiagoelg commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4335475138
Thanks @kbowers-ibm!
I tried to recreate [this BPMN](https://gist.github.com/thiagoelg/0df718158a375bace8292ca703bdca8c#file-travelers_old-bpmn), but it's failing with:
```
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.27.2:build (default) on project process-event-driven-travelers: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateModel threw an exception: org.kie.memorycompiler.KieMemoryCompilerException: [org/acme/travel/TravelersMessageConsumer__403851DA_EFA3_4FF2_8EED_2AB05ABA2581.java (51:31) : incompatible types: java.lang.Object cannot be converted to org.acme.travel.Traveler]
[ERROR] at org.kie.memorycompiler.KieMemoryCompiler.compileNoLoad(KieMemoryCompiler.java:140)
[ERROR] at org.kie.memorycompiler.KieMemoryCompiler.compileNoLoad(KieMemoryCompiler.java:108)
[ERROR] at org.drools.quarkus.util.deployment.DroolsQuarkusResourceUtils.compileGeneratedSources(DroolsQuarkusResourceUtils.java:148)
[ERROR] at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.createGeneratedBeanBuildItemsFromJavaSources(KogitoAssetsProcessor.java:309)
[ERROR] at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateModel(KogitoAssetsProcessor.java:189)
[ERROR] at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:874)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1622)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1589)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:840)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
```
Here's the BPMN created with the new editor: https://gist.github.com/thiagoelg/0df718158a375bace8292ca703bdca8c#file-travelers_new-bpmn
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on code in PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#discussion_r3283859969
##########
packages/bpmn-editor/src/mutations/_dataMapping.ts:
##########
@@ -225,15 +225,34 @@ import { addOrGetProcessAndDiagramElements } from "./addOrGetProcessAndDiagramEl
import { visitFlowElementsAndArtifacts } from "./_elementVisitor";
import { DEFAULT_DATA_TYPES } from "./addOrGetItemDefinitions";
+function updateMessageItemRefForMessageEvent(
+ definitions: Normalized<BPMN20__tDefinitions>,
+ event: any,
Review Comment:
Can't we use a specific type here to avoid `any` being propagated?
##########
packages/bpmn-editor/src/mutations/_dataMapping.ts:
##########
@@ -225,15 +225,34 @@ import { addOrGetProcessAndDiagramElements } from "./addOrGetProcessAndDiagramEl
import { visitFlowElementsAndArtifacts } from "./_elementVisitor";
import { DEFAULT_DATA_TYPES } from "./addOrGetItemDefinitions";
+function updateMessageItemRefForMessageEvent(
+ definitions: Normalized<BPMN20__tDefinitions>,
+ event: any,
+ itemSubjectRef: string
+) {
+ const messageEventDef = event.eventDefinition?.find((ed: any) => ed.__$$element === "messageEventDefinition");
+ if (!messageEventDef?.["@_messageRef"]) return;
+
+ const messages = definitions.rootElement?.filter((e) => e.__$$element === "message") ?? [];
+ const message = messages.find((m) => m["@_id"] === messageEventDef["@_messageRef"]);
Review Comment:
```suggestion
const message = definitions.rootElement?.find((e) => e.__$$element === "message" && e["@_id" === messageEventDef["@_messageRef"]) ?? [];
```
##########
packages/bpmn-editor/src/mutations/deleteOrphanedCorrelationSubscriptions.ts:
##########
@@ -0,0 +1,84 @@
+/*
+ * IBM Confidential
+ * PID 5900-AR4
+ * Copyright IBM Corp. 2026
+ */
+/*
Review Comment:
leftover?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "thiagoelg (via GitHub)" <gi...@apache.org>.
thiagoelg commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4581355547
Merging as this PR fixes some important issues with the BPMN Editor. A new follow-up PR should be opened to address @ljmotta comments.
Thank you @kbowers-ibm!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "kbowers-ibm (via GitHub)" <gi...@apache.org>.
kbowers-ibm commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4506670644
Hi @jomarko Thank you very much for the review!
[bug] BPMN Editor: Correlation Key and Subscription not cleaned up after deletion
> It seems new editor does not load that file in a way, that would display all data. For example properties panel does not show message for message events.
Yeah that's a problem we've had elsewhere, I'll look into the exact fields that aren't displaying and create a separate ticket for it, thank you!
> It is using correlations. When I delete all correlation stuff, there remains collaboration ðŸŸ
That's intentional, the old bpmn editor always has a collaboration+participant so I wanted to keep the functionality the same.
[bug] BPMN Editor: Message Start Event-itemDefinition Not Assigning Value to structureRef
> is it expected new editor set all message structure ref to Object? ðŸŸ
Yes we decided to create a default value of Object for all itemDefinitions, unless specified otherwise.
And we've also created a generic itemDefinition that relates to all messages, which has the value:
` <itemDefinition id="__messageItemDefinition" structureRef="Object" />
`That way we don't clutter the xml with too many itemDefinitions, and only update them when the message needs to be linked to a specific itemDefinition
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4512036130
I had two problems while reproducing the `hotel.bpmn` from the `process-event-driven` example.
1. Create the correlation first, update the process id later. I've started replicating the same file with a different `processId`. After I've renamed the `processId` to match the orignal file I've realized the `processRef` from the `participant` element wasn't updated accordlying, resulting in a build error.
2. Create the `message` first, use it on the correlation later. Creating the message on the Event node, and then using it to create the correlation will not properly set the message type reference resulting on a build error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "kbowers-ibm (via GitHub)" <gi...@apache.org>.
kbowers-ibm commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4488118533
Hi @thiagoelg
Thanks for the review!
The problem was that:
BPMN messages were not linked to their ItemDefinitions, as all messages defaulted to the generic __messageItemDefinition with structureRef="Object" instead of referencing specific data types (e.g., Traveler, ProcessedTraveler), causing compilation failures.
I've implemented a solution that links messages to ItemDefinition at three levels:
1. Message Creation/Selection (addOrGetMessages.ts)
- Added optional dataType parameter
- Updates message's @_itemRef to match the correct ItemDefinition when creating or retrieving messages
2. UI Filtering (MessageSelector.tsx, EventDefinitionProperties.tsx)
- MessageSelector filters dropdown to show only type-compatible messages
- EventDefinitionProperties extracts data type from event's dataInput/dataOutput and passes it to message operations
3. Data Mapping Sync (_dataMapping.ts)
- Added updateMessageItemRefForMessageEvent() helper
- Automatically updates message's itemRef when data mappings are added/changed
- Handles scenario where message is assigned before data mappings exist
Result: Messages now automatically link to correct ItemDefinitions whether assigned during message selection or when data mappings are added later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on code in PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#discussion_r3327325672
##########
packages/bpmn-editor/src/propertiesPanel/itemDefinitionRefSelector/ItemDefinitionRefSelector.tsx:
##########
@@ -132,15 +134,25 @@ export function ItemDefinitionRefSelector({
const v = selectedDataType ? itemDefinitionsByDataType.get(selectedDataType)?.itemDefinitionRef : undefined;
return (
- <TypeaheadSelect
- isMultiple={false}
- isDisabled={isReadOnly}
- id={`kie-bpmn-editor--item-definition-ref-selector--${id}`}
- selected={v}
- setSelected={_onChange}
- options={options}
- onCreateNewOption={(newOptionLabel) => addOrGetItemDefinitionId({ newDataType: newOptionLabel })}
- createNewOptionLabel={i18n.propertiesPanel.createDataType as string}
- />
+ <div
+ style={{
+ ...(isDisabled && {
+ backgroundColor: "var(--pf-global--disabled-color--300)",
+ borderRadius: "3px",
+ opacity: 0.6,
+ }),
+ }}
+ >
Review Comment:
This could be moved to the `css` file.
##########
packages/bpmn-editor/src/propertiesPanel/propertiesManager/PropertiesManager.tsx:
##########
@@ -303,6 +311,73 @@ export function PropertiesManager({ p }: { p: undefined | WithVariables }) {
}}
/>
</GridItem>
+ <GridItem span={5}>
+ <ItemDefinitionRefSelector
+ value={entry["@_itemRef"]}
+ onChange={(newItemDefinitionRef) => {
+ bpmnEditorStoreApi.setState((s) => {
Review Comment:
As my previous comments, this should be on a mutation
##########
packages/bpmn-editor/src/mutations/addOrGetItemDefinitions.ts:
##########
@@ -34,16 +35,20 @@ export const DEFAULT_DATA_TYPES = {
export function addOrGetItemDefinitions({
definitions,
dataType,
+ id,
Review Comment:
I believe this is a leftover. I couldn't see where it is used.
##########
packages/bpmn-editor/src/propertiesPanel/GlobalProperties.tsx:
##########
@@ -259,7 +259,19 @@ export function GlobalProperties() {
const { process } = addOrGetProcessAndDiagramElements({
definitions: state.bpmn.model.definitions,
});
+ const oldProcessId = process["@_id"];
process["@_id"] = newId;
+ const collaboration = state.bpmn.model.definitions.rootElement?.find(
+ (e) => e.__$$element === "collaboration"
+ );
+ if (collaboration && collaboration.__$$element === "collaboration") {
+ const participant = collaboration.participant?.find(
+ (p) => p["@_processRef"] === oldProcessId
+ );
+ if (participant) {
+ participant["@_processRef"] = newId;
+ }
+ }
Review Comment:
This entire change should be on a mutation, including the `process["@_id"] = newId;`
##########
packages/bpmn-editor/src/propertiesPanel/correlations/Correlations.tsx:
##########
Review Comment:
This file contain many changes to correlation elements outside of a mutation. We should refactor some methods, as changes to the definitions should happen on a mutation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "thiagoelg (via GitHub)" <gi...@apache.org>.
thiagoelg merged PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "kbowers-ibm (via GitHub)" <gi...@apache.org>.
kbowers-ibm commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4372333391
Upstream Sync has been merged, this is ready for review FYI @thiagoelg @tiagobento
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#1933] The new React-based BPMN Editor - more bug fixes [incubator-kie-tools]
Posted by "kbowers-ibm (via GitHub)" <gi...@apache.org>.
kbowers-ibm commented on PR #3555:
URL: https://github.com/apache/incubator-kie-tools/pull/3555#issuecomment-4563987769
Hi @ljmotta
Thanks for the feedback!
> Create the correlation first, update the process id later. I've started replicating the same file with a different processId. After I've renamed the processId to match the orignal file I've realized the processRef from the participant element wasn't updated accordingly, resulting in a build error.
I've fixed this and will create a ticket for it shortly.
> Creating a data output on the message node will update the message itemRef, overriding the correlation itemRef.
This was a mistake, the message itemRef has nothing to do with correlations and is solely controlled by the data mapping. I've removed the all code relating to changing the messages itemRef through correlations.
> It is currently possible to create multiple output mappings on a Message event, but only the last one is actually applied to the itemRef.
It's now only possible to create one data mapping on messages nodes, following the functionality of the old bpmn editor.
> What should the itemRef be when a message event contains multiple output mappings?
No longer possible
> What should the itemRef be when both correlation and output mappings are defined?
Only output mappings determines the itemRef
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org