Bug 991374

Summary: Unable to open BPMN2 definition which contains DataObject without name
Product: [Retired] JBoss BPMS Platform 6 Reporter: Sona Mala <smala>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Kirill Gaevskii <kgaevski>
Severity: medium Docs Contact: Dawn Eisner <deisner>
Priority: medium    
Version: 6.0.0CC: kverlaen, mbaluch, rrajasek, rzhang, tsurdilo
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When creating a new BPMN2 process, if the user doesn't assign a name to a DataObject unit, the project will not reopen after saving. The Designer will attempt to open the project but will never load. Cause: Consequence: Fix: Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:33:39 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
server.log
none
Image of the process definition
none
Process definition from Designer
none
server.log - The exception which is generated by Save operation
none
server.log - The exception which is generated by Validation operation
none
Alert for source code view
none
BZ991374_ER5.mp4 none

Description Sona Mala 2013-08-02 09:18:08 UTC
Created attachment 781895 [details]
server.log

Description of problem:
Please follow steps to reproduce. User is not able to open designer if he creates, saves and closes process with DataInput without name.


Version-Release number of selected component (if applicable):
6.0.0. CR1

How reproducible:


Steps to Reproduce:
1. create new BPMN2 process
2. add Start Node, append Task, append DataObject, append Task, append End Node, add sequence flow between Tasks. (attached screenshot and definition)
3. save process
4. close process
5. accept alert "Business Process may contain unsaved changes. Are you sure you would like to close the editor?"
6. open process again

Actual results:
Designer is loading but it never ends. Server.log contains NullPointerException.
Now this process will be in the project forever, because without designer I am not able to delete it.

Expected results:
Process is able to open again and fix a problems. 


Additional info:
Attached process definition is not able to import into designer.

Comment 1 Sona Mala 2013-08-02 09:19:23 UTC
Created attachment 781896 [details]
Image of the process definition

Comment 2 Sona Mala 2013-08-02 09:20:02 UTC
Created attachment 781897 [details]
Process definition from Designer

Comment 3 Sona Mala 2013-08-02 09:21:53 UTC
By the way, if user tries to see BPMN2 code for this element (Source view in Quick menu) then this functionality failed.

Comment 4 Tihomir Surdilovic 2013-08-28 15:53:46 UTC
Fixed in master and 6.0.x. If DataObject name is not set it will get set to the node id on save operation.

Comment 5 Sona Mala 2013-09-19 08:26:53 UTC
I verify that such process is able to reopen without problem for ER3.


But the process behaviour before saving is different then the process behaviour after reopen.
  - Before:
      -> unable to view source code for the data object
      -> the data object has no name
  - After:
      -> source code for the data object is correct
      -> the data object display name "ID"

The reopening of process fix describes problem, but if an user want to work with such process without reopening, he has lots of problems and Designer generates exceptions in server.log.

The validation does not show any issue, but it generates exceptions into server.log. An alert which is generated by source code view say nothing. The user does not know that he must fill an attribute "name".

This fix is just a hot fix. I think that such issue needs more complex solution.

I do not think that is right to change process without user.

Imagine that an user closes a process with a data object without name (no name is displayed) and after some time he opens same process and now there is a strange sequence of characters. The user may be disappointed. 

I think that BPMN2 specification does not require attribute "name". This attribute is inherited from Flow Element. This means that a data object should have same behaviour as a start node without name.

I can imagine these kinds of fix:
  - fix 1 (the best way):
     -> a data association works with ID in case that "name" is empty
     -> a data object is empty until the user set a property "name"
     -> is able to generate a source code for a data object without "name"
     -> is able to open process which contains data objects without "name"

  - fix 2 (actual fix is a part of this variant):
     -> a data object requires name
     -> the validation shows that a data object requires "name" attribute
     -> view of source code can failed
     -> in case that an user (or automatic save) saves a process, which contains a data object without name, Designer can complete "name" by "ID", but after reopening of this process Designer should reveres these changes (if name == ID then name = "")

  - fix 3 (the easiest way to fix):
     -> a data object requires name
     -> if a new instance of data object is present on canvas then its name is equal to ID.
     -> an user cannot set a name as empty string (see Reusable process, attribute "Called element")

  - fix 4:
     -> a data object requires name
     -> the validation shows that a data object requires "name" attribute
     -> view of source code can failed
     -> in case that an user (or automatic save) saves a process, which contains a data object without name, show alert and text editor with bpmn2 code.

Comment 6 Sona Mala 2013-09-19 08:36:04 UTC
Created attachment 799792 [details]
server.log - The exception which is generated by Save operation

Comment 7 Sona Mala 2013-09-19 08:36:34 UTC
Created attachment 799793 [details]
server.log - The exception which is generated by Validation operation

Comment 8 Sona Mala 2013-09-19 08:37:14 UTC
Created attachment 799795 [details]
Alert for source code view

Comment 12 Kris Verlaenen 2013-10-10 22:44:48 UTC
Tiho, can we set the name of a dataObject to "dataObject" when it's created, and prevent users from setting it to ""?

In the future, we can look at using a real id for dataObject and variables (and use name only as display name), although that might then be tricky to use these variables in scripts etc. (as the name is not necessarily set, or unique).  I would allow nested variables with the same name though.  But this would need to be supported in the engine first.

Comment 13 Tihomir Surdilovic 2013-10-15 17:19:04 UTC
added default name set to "dataObject" for data object nodes

Comment 14 Marek Baluch 2013-11-27 21:19:19 UTC
DataObject name can still be set to "" and then after reopening ID will became also the name of the DataObject.

See attached screencast (BZ991374_ER5.mp4)

Comment 15 Marek Baluch 2013-11-27 21:20:46 UTC
Created attachment 829920 [details]
BZ991374_ER5.mp4

Comment 16 Kris Verlaenen 2013-12-12 23:43:29 UTC
This will be addressed in a later release, for now DataObject will be disabled:
https://bugzilla.redhat.com/show_bug.cgi?id=1042524

Comment 18 Kirill Gaevskii 2015-12-07 14:54:17 UTC
Default "dataObject" name [bug 1002168 comment 14], "" and auto generated DataObject ID [bug 1002168 comment 14] is the only options for working Business Process now. If you will change this ID (or default name "dataObject") to another name (fore example: "exampleName" and even "dataObject" if DataObject ID saved as it's name) XmlEditor will be open instead of normal Designer.

Do we have plans to support DataObjects before 7.0?

Comment 20 Red Hat Bugzilla 2023-09-14 01:48:40 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days