Bug 1329938

Summary: Process can be modeled into an inconsistent state without any prior notification
Product: [Retired] JBoss BPMS Platform 6 Reporter: Anton Giertli <agiertli>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Kirill Gaevskii <kgaevski>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:13:08 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:

Description Anton Giertli 2016-04-25 06:31:48 UTC
Description of problem:
Process can be modeled into an inconsistent state without any prior notification

Version-Release number of selected component (if applicable):
BPM Suite 6.2.0 / 6.2.1 / 6.2.2

How reproducible:
always

Steps to Reproduce:
1. Model a process including one process variable
2. Add start->task->end and use this process variable in Task Output Assignment
3. Delete the process variable and save the process
4. Refresh the business-central and try to re-open the process

At this point, web designer displays popup window with message: "Process will be opened with XML Editor" and once you click OK, XML Editor is opened - process can't be opened in the graphical designer anymore.
Any exception is swallowed and not displayed in the server.log. User is not warned about the root cause of the error. 

Actual results:

Once you delete process variable - which is still used somewhere else - you turn the process into inconsistent state and you are unable to open it again.

Expected results:

Either:
 - User should NOT be allowed to delete process variable which is still used in Task
 - User should be offered an option to delete corresponding Task input/output variables alongside with the process variable he is trying to delete
 - User should be allowed to delete the process variable,  but if it's used anywhere else, then he should be notified about this when he re-open the process, so he has chance to correct this state

Additional info:
This is a major usability issue -  I am not sure what is the best solution to this, it should be the one which is most suitable from the UX perspective.