Bug 991374 - Unable to open BPMN2 definition which contains DataObject without name [NEEDINFO]
Unable to open BPMN2 definition which contains DataObject without name
Status: ASSIGNED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Designer (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium
: ER5
: 6.0.0
Assigned To: Tihomir Surdilovic
Kirill Gaevskii
Dawn Eisner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-02 05:18 EDT by Sona Mala
Modified: 2016-10-14 10:09 EDT (History)
5 users (show)

See Also:
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:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
kgaevski: needinfo? (tsurdilo)


Attachments (Terms of Use)
server.log (17.16 KB, text/x-log)
2013-08-02 05:18 EDT, Sona Mala
no flags Details
Image of the process definition (12.38 KB, image/png)
2013-08-02 05:19 EDT, Sona Mala
no flags Details
Process definition from Designer (10.81 KB, application/xml)
2013-08-02 05:20 EDT, Sona Mala
no flags Details
server.log - The exception which is generated by Save operation (5.08 KB, text/x-log)
2013-09-19 04:36 EDT, Sona Mala
no flags Details
server.log - The exception which is generated by Validation operation (657 bytes, text/x-log)
2013-09-19 04:36 EDT, Sona Mala
no flags Details
Alert for source code view (262 bytes, text/plain)
2013-09-19 04:37 EDT, Sona Mala
no flags Details
BZ991374_ER5.mp4 (1.09 MB, video/mp4)
2013-11-27 16:20 EST, Marek Baluch
no flags Details

  None (edit)
Description Sona Mala 2013-08-02 05:18:08 EDT
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 05:19:23 EDT
Created attachment 781896 [details]
Image of the process definition
Comment 2 Sona Mala 2013-08-02 05:20:02 EDT
Created attachment 781897 [details]
Process definition from Designer
Comment 3 Sona Mala 2013-08-02 05:21:53 EDT
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 11:53:46 EDT
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 04:26:53 EDT
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 04:36:04 EDT
Created attachment 799792 [details]
server.log - The exception which is generated by Save operation
Comment 7 Sona Mala 2013-09-19 04:36:34 EDT
Created attachment 799793 [details]
server.log - The exception which is generated by Validation operation
Comment 8 Sona Mala 2013-09-19 04:37:14 EDT
Created attachment 799795 [details]
Alert for source code view
Comment 12 Kris Verlaenen 2013-10-10 18:44:48 EDT
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 13:19:04 EDT
added default name set to "dataObject" for data object nodes
Comment 14 Marek Baluch 2013-11-27 16:19:19 EST
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 16:20:46 EST
Created attachment 829920 [details]
BZ991374_ER5.mp4
Comment 16 Kris Verlaenen 2013-12-12 18:43:29 EST
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 09:54:17 EST
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?

Note You need to log in before you can comment on or make changes to this bug.