Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1092148

Summary: NPE on save when a 'connecting object' is not connected to activities.
Product: [Retired] JBoss BPMS Platform 6 Reporter: Marek Baluch <mbaluch>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Marek Baluch <mbaluch>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: kverlaen, mbaluch, rrajasek, tsurdilo
Target Milestone: ER3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
BPMS 6.0.2.ER2
Last Closed: 2020-03-27 19:39:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot
none
server.log jsvitak: review? (tsurdilo)

Description Marek Baluch 2014-04-28 20:13:21 UTC
Description of problem:
When a 'connecting object' like a sequence flow or association is not connected to activities (both ends) then a NPE is thrown on save and all user modifications will be lost on close.

Additional info:
See attached screenshot on how to reproduce.

Comment 1 Marek Baluch 2014-04-28 20:13:56 UTC
Created attachment 890587 [details]
screenshot

Comment 2 Tihomir Surdilovic 2014-05-29 17:20:09 UTC
The problem is with the jbpm parser which throws a runtime exception when it encounters a "dangling" connection. Designer itself is fine with it. I would suggest that we raise a jbpm parser bz for this and discuss there the best ways to implement a solution for this.

Specifically for Designer I have removed the "Connecting Objects" section from the shape menu. Users can easily connect objects via the quick shape menu and thats what they use 99.9% of the time. This way dangling connections can be minimized completely while we work on the parser to see if anything should be changed there.

Comment 3 Jiri Svitak 2014-06-25 12:39:58 UTC
The issue still persists in BPMS 6.0.2.CR2.

Tihomir, you mention that you have removed the "Connection objects" section, but I am still able to see this section in the shape menu.

Returning back.

Comment 4 Jiri Svitak 2014-06-25 12:45:03 UTC
Created attachment 912084 [details]
server.log

Attaching the stack trace.

The stack trace does not contain calls to jbpm core, the problem seems to be related to Bpmn2JsonUnmarshaller.

Tihomir, can you please explain the need for jBPM parser (jBPM core) bugzilla? Thanks!

Comment 5 Marek Baluch 2014-06-25 13:05:50 UTC
Removing features is IMHO not the path we want to take. Addressing the issue in the correct component is what we should do.

Comment 6 Tihomir Surdilovic 2014-06-25 14:47:22 UTC
The section has been removed (fixes in designer master and 6.1.x branches). Maybe you need to clear your browser cache or are testing with some other version possibly?

Comment 7 Jiri Svitak 2014-06-25 14:50:58 UTC
I said that the issue persists in BPMS 6.0.2.CR2 and 6.0.2 is the target release for this Bugzilla. There is no build for 6.1 yet.

Comment 9 Tihomir Surdilovic 2014-06-25 15:01:53 UTC
Commits:

(master) https://github.com/droolsjbpm/jbpm-designer/commit/ff7b02c72c87229fc52f331d280fbe07a9c30ac7 - ff7b02c72c87229fc52f331d280fbe07a9c30ac7


(6.1.x) https://github.com/droolsjbpm/jbpm-designer/commit/ff7b02c72c87229fc52f331d280fbe07a9c30ac7 - ff7b02c72c87229fc52f331d280fbe07a9c30ac7

Comment 10 Jiri Svitak 2014-06-25 15:04:08 UTC
Hi Kris,
could you please read the comments we wrote with Marek?

We do not want the "Connection objects" section to be just removed. We should fix the root problem, not just remove existing features. We think that the NPE comes only from Bpmn2JsonUnmarshaller in the Designer, can you please check also the attached stack trace?

Comment 11 Kris Verlaenen 2014-09-18 14:30:09 UTC
I agree that we should try to solve the issue without having to remove the connections from the palette.  I think the best option would be to simply not allow connections to exist without being attached to a node, so that you simply cannot create connections that are not linked to a node.  This would be consistent with Eclipse Modeler.

Tiho, could you check the feasibility of this?

Comment 12 Jeremy Lindop 2014-11-27 12:13:27 UTC
Fixed by not allowing Association objects, (e.g. links from Text Annotations to Tasks), which aren't linked at both ends. If a detached Association exists when the BP is saved, the Association itself is not saved. Although not saving these Associations is not ideal, it seems like a reasonable compromise, given that an Association which does not have both a source and target reference is invalid in BPMN2.0.

master: https://github.com/droolsjbpm/jbpm-designer/commit/d2e638508f94f0f4e12639441b071ad23fafa5e1
6.2.x:  https://github.com/droolsjbpm/jbpm-designer/commit/2abf6e23d3065f432b1490497594550f7a5ca7b6

Comment 13 Jeremy Lindop 2014-11-27 12:47:17 UTC
Reverted the commit in comment 9 which removed the "Connecting Objects" section of the palette.

master: https://github.com/droolsjbpm/jbpm-designer/commit/9db0d0b9416f66b9c2ed075f7bf53068c99da29a
6.2.x:  https://github.com/droolsjbpm/jbpm-designer/commit/c2fec89b461d380f6dd4f60f1840b388c0c0ff0d

Comment 14 Jiri Svitak 2014-12-19 18:54:36 UTC
Thanks Jeremy for fixing this. It works exactly how you have described.

Verified in BPM Suite 6.1.0 ER3.