Bug 757704

Summary: Decision Table Wizard allows to update an undefined Fact
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: BRM (Guvnor)Assignee: manstis
Status: VERIFIED --- QA Contact: Lukáš Petrovický <lpetrovi>
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: lpetrovi, manstis
Target Milestone: ---   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The decision table wizard allowed users to add a fact pattern with a binding and update that fact in an action column. If the user didn't add a constraint to the Fact (some condition column), then the finished decision table source points to an undefined Fact in the "when" section, and validation failed. It is no longer possible to define actions to update a fact pattern which has zero constraints defined.
Story Points: ---
Clone Of: Environment:
Last Closed: 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
decision table source
none
validation result none

Description Zuzana Krejčová 2011-11-28 12:59:04 UTC
Created attachment 537458 [details]
decision table source

Description of problem:
DT Wizard allows you to add a Fact pattern with a binding and update that Fact in an action column. If you don't add a constraint to the Fact (some condition column), then the finished DT source points to an undefined Fact in the "when" section. Validation fails.


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


Steps to Reproduce:
1. Create a new rule - guided decision table - using the wizard.
2. Add a Fact pattern with binding "factBinding". Don't add any constraints to the Fact.
3. Add action to update a Fact - update some field of the Fact with binding "factBinding".
4. Click Finish.
5. Add a row and fill in some values into the cells.
6. Click View source from the Source menu.

  
Actual results:
The source shows empty "when" section and "factBinding.setField(value);", using the undefined "factBinding" variable/binding.


Expected results:
Either the source contains something like "when   factBinding:Fact()" or the wizard doesn't allow to update a Fact without any constraints.

Comment 1 Zuzana Krejčová 2011-11-28 12:59:42 UTC
Created attachment 537459 [details]
validation result

Comment 2 manstis 2011-12-02 13:08:01 UTC
Fixed and back-ported to 5.3.x branch.

Comment 4 lcarlon 2012-06-01 05:30:30 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The decision table wizard allowed users to add a fact pattern with a binding and update that fact in an action column. If the user didn't add a constraint to the Fact (some condition column), then the finished decision table source points to an undefined Fact in the "when" section, and validation failed.

Comment 5 lcarlon 2012-06-01 05:33:03 UTC
Hi Mike,

Sorry another one :) For the release notes, if you could let me know how this was resolved, I can add it to the release notes to warn customers about changes that might affect them.

Thanks
Lee

Comment 6 manstis 2012-06-01 08:55:58 UTC
No problem: You can no longer define actions to update a Fact Pattern where the Fact Pattern had zero constraints defined. This behavior is consistent with that of defining a decision table without using the Wizard.

Comment 7 lcarlon 2012-06-03 22:04:21 UTC
Thanks Mike.

Comment 8 lcarlon 2012-06-03 22:19:51 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The decision table wizard allowed users to add a fact pattern with a binding and update that fact in an action column. If the user didn't add a constraint to the Fact (some condition column), then the finished decision table source points to an undefined Fact in the "when" section, and validation failed.+The decision table wizard allowed users to add a fact pattern with a binding and update that fact in an action column. If the user didn't add a constraint to the Fact (some condition column), then the finished decision table source points to an undefined Fact in the "when" section, and validation failed. It is no longer possible to define actions to update a fact pattern which has zero constraints defined.