Bug 1071205 - DRL validation returns results for all DRLs in project
Summary: DRL validation returns results for all DRLs in project
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER1
: 6.0.2
Assignee: manstis
QA Contact: Zuzana Krejčová
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-28 09:20 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 19:54:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
3 files, 2 of them invalid, validation results for the valid one (66.14 KB, image/png)
2014-02-28 09:20 UTC, Zuzana Krejčová
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1075039 0 medium CLOSED Validating rules that extend others is broken 2021-02-22 00:41:40 UTC

Internal Links: 1075039

Description Zuzana Krejčová 2014-02-28 09:20:07 UTC
Created attachment 868931 [details]
3 files, 2 of them invalid, validation results for the valid one

Description of problem:
See summary.
When there are multiple DRL files in a project and one of them is invalid, running validation on any of these DRL files will return results for the invalid DRL file. If there are more invalid DRLs, the validation result for any of them will show errors in all of them.


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


Steps to Reproduce:
1. In a project, create DRLs drl1, drl2, drl3.
2. Validate any of them - validation is successful.
3. Make drl1 invalid and save, run validation on all 3 DRLs - each time you get errors found in drl1.
4. Make drl2 invalid as well, save and again, validate all 3 DRLs - for each file, validation results show errors from both drl1 and drl2.

Comment 1 manstis 2014-02-28 13:58:33 UTC
Hmmm. This isn't really a bug.

A DRL file can reference DRL Queries and DRL Declarative Types; which themselves may be defined in other DRL files. So, in order to validate a DRL file we really need to load all other DRL files too. This is what you're observing.

There's no real way to ascertain what other DRL files need to be loaded to validate a single DRL file.

Comment 2 manstis 2014-02-28 14:04:43 UTC
An alternative, and probably less impact to the average user, is to just validate the single DRL file and if things needed by the file being validated (Queries or Declared Types) are not in the same file they'll get a validation error. What do you think?

Comment 3 manstis 2014-03-10 14:41:37 UTC
Hi Zuzana, re: comments 1 and 2, what are your thoughts?

Comment 4 Zuzana Krejčová 2014-03-17 16:27:00 UTC
(In reply to manstis from comment #3)
> Hi Zuzana, re: comments 1 and 2, what are your thoughts?

Sorry for the late reply - I had vacation.

As for the issue.. I can't say I like either of these approaches. If I request validation for one file, I expect to get results for that file. Not for other drl files. If the one I'm interested in is valid and others are not, I won't see that now - I will only see validation errors. This isn't very good.
On the other hand, if I (correctly) use stuff from other drl files, the file being validated is ok and I get validation error stating that some fact or query could not be found, I'll be quite surprised and frustrated as well.

It would be really cool to run the validation with all the drl files loaded, but then present results only for the one file the user is interested in.
After all, if I want a report on all the problems in the project, there's the Problems panel.

What do you think? Is it doable (and/or reasonable)?

Comment 5 manstis 2014-03-18 18:51:21 UTC
I agree. Implemented.

Comment 7 Zuzana Krejčová 2014-04-29 13:00:40 UTC
Verified with ER2, thanks.


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