Bug 1071205

Summary: DRL validation returns results for all DRLs in project
Product: [Retired] JBoss BRMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Business CentralAssignee: manstis
Status: CLOSED CURRENTRELEASE QA Contact: Zuzana Krejčová <zkrejcov>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: kverlaen, lpetrovi, zkrejcov
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: Environment:
Last Closed: 2014-08-06 19:54:15 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:
Embargoed:
Attachments:
Description Flags
3 files, 2 of them invalid, validation results for the valid one none

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.