Bug 1331456

Summary: business-central editors includes "Delete" button for files which are already deleted
Product: [Retired] JBoss BPMS Platform 6 Reporter: Anton Giertli <agiertli>
Component: Business CentralAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: manstis
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:09:33 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:
Attachments:
Description Flags
Buttons disabled none

Description Anton Giertli 2016-04-28 14:44:00 UTC
Description of problem:
If you reproduce the issue described here:
https://bugzilla.redhat.com/show_bug.cgi?id=1331452

You'll notice that the editor which attempted to display the given resources still contains "DELETE" button

https://ctrlv.cz/shots/2016/04/28/5Tnz.png

Version-Release number of selected component (if applicable):
BPM suite 6.2.2

How reproducible:
always

Steps to Reproduce:
Reproduce the issue by following steps outlined in
https://bugzilla.redhat.com/show_bug.cgi?id=1331452

Notice that the Web Designer, which is trying to open the deleted resources, still contains the "Delete" button
https://ctrlv.cz/shots/2016/04/28/5Tnz.png

This does not make sense, since clicking on it, another FileNotFound error will be displayed

Actual results:
Delete button is displayed in various editors, for resources which are already deleted

Expected results:
Either make sure that no editor will attempt to open a deleted file under any circumstances, OR make sure that when it does, there will not be any  "Delete" button display, when the resource is deleted as it does not make sense.
Simply including "Close" (X) button would be more suitable.

Additional info:

Comment 2 manstis 2016-04-29 14:42:13 UTC
I checked the Editors extending KieEditor and they already handle this correctly [1][2]. See the attached screen shot. It might be that Designer needs better handling of asset retrieval (when the FileSystem or File cannot be found) as Designer does not use Errai RPC.

[1] https://github.com/droolsjbpm/kie-wb-common/blob/master/kie-wb-common-widgets/kie-wb-metadata-widget/src/main/java/org/kie/workbench/common/widgets/metadata/client/KieEditor.java#L161

[2] https://github.com/droolsjbpm/drools-wb/blob/master/drools-wb-screens/drools-wb-drl-text-editor/drools-wb-drl-text-editor-client/src/main/java/org/drools/workbench/screens/drltext/client/editor/DRLEditorPresenter.java#L102

Comment 3 manstis 2016-04-29 14:42:32 UTC
Created attachment 1152340 [details]
Buttons disabled