Bug 1116104 - Unable to delete Data Provider - "Cannot delete the data provider because it is being used by 7 KPI(s)"
Summary: Unable to delete Data Provider - "Cannot delete the data provider because it ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: BAM
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER4
: 6.1.0
Assignee: Roger Martínez
QA Contact: Gui Jospin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-03 18:24 UTC by Amana
Modified: 2020-03-27 20:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:06:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Video showing steps to reproduce the issue (11.94 MB, video/webm)
2014-07-04 06:12 UTC, Jan Hrcek
no flags Details
Screenshot of the new delete data provider screen (93.17 KB, image/png)
2014-12-05 12:45 UTC, Roger Martínez
no flags Details
Screenshot of the new delete data provider screen - New confirm message literal (91.50 KB, image/png)
2014-12-05 18:03 UTC, Roger Martínez
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1001827 0 unspecified CLOSED Unable to delete Data Provider 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBPM-4108 0 Major Closed Unable to delete Data Provider because it is used by 2 KPI's, but no way to find the 2 KPI's 2015-03-11 15:28:31 UTC
Red Hat Knowledge Base (Solution) 1281143 0 None None None Never

Description Amana 2014-07-03 18:24:21 UTC
Description of problem:

It is not possible to delete a Data Provider, the following message is thrown:

 "Cannot delete the data provider because it is being used by 7 KPI(s)"



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

BPM Suite 6

How reproducible:

Always

Steps to Reproduce:
1. Try to delete a data provider

Actual results:

Message above is displayed.

Expected results:

It should remove data provider.

Additional info:

Comment 2 Jan Hrcek 2014-07-04 05:49:27 UTC
Hello Amana,
this is actually not a bug, it's intended behavior.
Data Provider in Dashbuilder is basically a thing, that provides data to KPI panels (those are the panels with graphs/charts/tables - Key Performance Indicators or KPIs in Dashbuilder technology). If you were allowed to delete data providers without restriction, you could break the configuration of you KPI panels, i.e. they wouldn't know from where to get data to display.

So to resolve this issue (to delete a specific Data Provider) what you need to do is:
1) Log in to dashbuilder with user who has admin rights (with role admin)
2) Indentify the KPI panels (those panels with graphs/charts/tables) which are using the data provider you want to delete. Unfortunately I am not aware of an easy way to do this - you probably have to look at which KPI panel uses which Data Provider.
3) Either
	a) delete those KPI panels
	b) reconfigure those KPI panels to use different Data Provider
4) Now you should be able to delete the Data Provider

Comment 3 Jan Hrcek 2014-07-04 06:12:13 UTC
Created attachment 914640 [details]
Video showing steps to reproduce the issue

Comment 4 Jan Hrcek 2014-07-04 06:13:08 UTC
My bad, I actually tried the the steps I described and it seems the process to delete a specific data provider is a bit more complicated.

The steps to reproduce the issue. Say I want to detele "jBPM Count Process" data provider.
1) I go to "Showcase" workspace > "Data providers" page with the intention to delete "jBPM Count Process" - it's impossible to delete it now, because it's used by 1 KPI
2) I know that the one KPI that uses this data provider is in jBPM Dasbhoard workspace - it's KPI "Process instances by status"
3) I go to General Options and expand Workspaces > jBPMS Dashboard > Panel Instances and delete the "Process instances by status"

Now here's the weird thing: the steps above should be enough in my opinion to be able delete given data provider, but they are not. The data providers panel still says that there is 1 KPI using the data provider. I have to do the following additional steps to delete the provider:

4) go to General Options and expand Workspaces > Showcase > Panel Instances and delete the "Process instances by status"

@David: Please see the video attached.
From bug 976698 I am aware, that data providers are shared across workspaces. But I am confused about why I have to delete Panel Instance of "Process instances by status" also in Showcase workspace, even though it is only used in jBPM Dashboard.
Is it expected behaviour (strange), configuration issue or an actual bug?

Comment 7 Roger Martínez 2014-12-05 12:45:07 UTC
A new "Data provider delete" screen has been added.

When user click on delete data provider icon in the main data providers list, the new screen appears. It shows a table with all KPI instances that are using the data provider that will be deleted. If user confirms, data provider and ALL THE KPI instances will be deleted.

I have attached an screenshot of the new screen.

Commit in master -> https://github.com/droolsjbpm/dashboard-builder/commit/760a83a4acdb89a622fed5420788a21fd864d9f1

Commit in 6.2.x -> https://github.com/droolsjbpm/dashboard-builder/commit/b3ecd62639ecb24e41f62d7018c1bbefb1a4ae4f

Comment 8 Roger Martínez 2014-12-05 12:45:56 UTC
Created attachment 965092 [details]
Screenshot of the new delete data provider screen

Comment 9 Jan Hrcek 2014-12-05 13:48:56 UTC
@ Roger: this solution looks nice. However I have a small problem with the deletion confirmation message, which I find confusing (my comments inline):

"Canot delete (realy? If user click delete then it will be deleted) the data provider because it is being used by 18 KPI(s) (So? And what about them? They will be deleted too, which is not mentioned)
Are you sure you want to delete this data provider?"


For example the following sounds less confusing:

"This data provider is used in 18 KPI(s). If you delete it, those KPIs will be deleted as well. Are you sure you want to proceed?"

Could you please revise the deletion confirmation message?

Comment 10 Roger Martínez 2014-12-05 18:00:02 UTC
Jan,

Absolutely agree :)

Confirmation message behavior changed as:

1.- If there are KPIs to remove as well:
I have used your confirmation message proposal: "This data provider is used in 18 KPI(s). If you delete it, those KPIs will be deleted as well. Are you sure you want to proceed?"

2.- If there is no KPI using this data provider, a simple message: "Are you sure you want to delete this data provider?"

Thanks!!!

Commit in master -> https://github.com/droolsjbpm/dashboard-builder/commit/d0742763ffbbbc811406f1599d6f86cad6084306

Commit in 6.2.x -> https://github.com/droolsjbpm/dashboard-builder/commit/24c13c335247e8fce24c529db2311de42d24dc2b

Comment 11 Roger Martínez 2014-12-05 18:03:32 UTC
Created attachment 965193 [details]
Screenshot of the new delete data provider screen - New confirm message literal

Changed the confirm message literal as Jan requested.

Comment 12 Jan Hrcek 2015-01-27 12:29:40 UTC
Great, now it works perfectly and the messages are intuitive too. Thanks!
Verified with BPM Suite 6.1.0 ER4

Comment 13 JBoss JIRA Server 2015-03-11 15:28:22 UTC
Roger Martínez <roger600> updated the status of jira JBPM-4108 to Resolved

Comment 14 JBoss JIRA Server 2015-03-11 15:28:32 UTC
Roger Martínez <roger600> updated the status of jira JBPM-4108 to Closed


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