Bug 757704 - Decision Table Wizard allows to update an undefined Fact
Summary: Decision Table Wizard allows to update an undefined Fact
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: manstis
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-28 12:59 UTC by Zuzana Krejčová
Modified: 2020-04-27 01:12 UTC (History)
2 users (show)

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.
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
decision table source (26.25 KB, image/png)
2011-11-28 12:59 UTC, Zuzana Krejčová
no flags Details
validation result (29.71 KB, image/png)
2011-11-28 12:59 UTC, Zuzana Krejčová
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 995379 0 unspecified CLOSED Decision Table Wizard: updating a fact without constraints allowed and buggy 2021-02-22 00:41:40 UTC

Internal Links: 995379

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.


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