Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 958398

Summary: Detect rule name duplication in Guvnor
Product: [Retired] JBoss BRMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: Business CentralAssignee: manstis
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: medium Docs Contact:
Priority: high    
Version: 5.x.xCC: brms-jira, etirelli, jlocker, jschatte, kverlaen, manstis, paradhya, pzapataf, rrajasek
Target Milestone: ER1   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 862163 Environment:
Last Closed: 2014-08-06 19:54:48 UTC Type: Feature Request
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
drl rule source saved
none
guided rule template source saved
none
project build none

Description Toshiya Kobayashi 2013-05-01 10:27:37 UTC
+++ This bug was initially created as a clone of Bug #862163 +++

Description of problem:

Platform BZ for https://issues.jboss.org/browse/GUVNOR-1948

Steps to Reproduce:
See details in GUVNOR-1948
  
Actual results:

1. 'Build package' finishes successfully
2. [QA] -> [Analysis] doesn't raise a WARNING

Expected results:

1. Build package' fails with an error massage
2. [QA] -> [Analysis] raises a WARNING

--- Additional comment from JBoss JIRA Server on 2012-12-06 17:00:07 EST ---

Adriel Paredes <aparedes> made a comment on jira GUVNOR-1948

I think that the warning should raise in the moment you are creating a new rule

--- Additional comment from JBoss JIRA Server on 2012-12-06 20:33:37 EST ---

Toshiya Kobayashi <tkobayas> made a comment on jira GUVNOR-1948

A same issue arises when you upload 2 XLS files and both have the same 'RuleTable' name which is used as rule name prefix.

Attached repository_export_duplicate_rules_xls.xml.

--- Additional comment from Geoffrey De Smet on 2013-03-05 08:39:58 EST ---

Reassign to the guvnor team, now that I am working full time on planner. So these issues aren't forgotten.

Comment 2 Prakash Aradhya 2013-08-06 19:52:59 UTC
same here... need to be tackled for 6.0

Comment 3 Edson Tirelli 2013-09-30 23:34:57 UTC
Pedro, can you check if someone in your group can tackle this one?

The core engine has a configuration option to define the severity of rule name duplication build result message: ERROR, WARN, INFO. Maybe all that is missing here is to properly catch that message and present to the user in the UI?

Comment 7 Jan 2013-10-14 15:11:20 UTC
When two rules are created with the same name, either in two separate DRL files or in the same, upon building & deploying the project an error message is raised and shown in the project editor problem window.

Comment 8 Jiri Locker 2014-01-15 09:34:24 UTC
Generally works, but name collision with template rules is not detected (not always). It is only detected when saving the rule template and there exists a rule with the same name. But when you create a rule with name colliding with rule template generated rule, the collision is not detected. And it is not detected when building the package either.

Comment 9 Jan 2014-01-24 11:24:10 UTC
Created attachment 854893 [details]
drl rule source saved

Comment 10 Jan 2014-01-24 11:35:55 UTC
Created attachment 854897 [details]
guided rule template source saved

Comment 11 Jan 2014-01-24 11:40:14 UTC
Created attachment 854899 [details]
project build

Comment 12 Jan 2014-01-24 11:43:30 UTC
I've tried both cases you mention, in a very recent build (23/01/2014) of version 6 (NOT 5.x.x as is mentioned in the bug specs!).

First case: existing template and saving a drl file containing a rule with the same name as one of the template rules.
When saving the drl file an error message is displayed in the problems window (see screenshot "drl rule source saved"),
as well as when building the project (see screenshot project_build).

Second case: existing drl file with one rule and saving a rule template file containing a set of rules, one of which has the same 
name as the drl rule.
When saving the template file an error message is displayed in the problems window (see screenshot "guided rule template source saved"),
as well as when building the project.

Comment 13 Jan 2014-01-24 11:46:22 UTC
Sorry, forgot to add:

Did you check this in the 6 version? if so, could you please recheck this in a recent build and if the problem persists give a more detailed scenario to reproduce the defect?

Comment 14 Jan 2014-03-25 13:37:14 UTC
This issue has been in needinfo since my last comment, since we have not been able to reproduce it in any way.

Comment 16 manstis 2014-04-04 15:11:32 UTC
Looking at, what I assume to be, the remaining issue.

I created a Template which generated a rule called "t1_0".

I then created a DRL file for a rule with the same name.

The "Problems Panel" correctly showed "Duplicate rule name: t1_0".

The same happened when I created a Guided Rule called "t1_0".

Comment 17 JBoss JIRA Server 2014-04-04 15:13:59 UTC
Michael Anstis <michael.anstis> updated the status of jira GUVNOR-1948 to Resolved

Comment 18 Jiri Locker 2014-05-06 15:28:27 UTC
Described collisions verified manually.