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

Bug 724639 (BRMS-547)

Summary: Can not set fact sub-fields inside statements like "Any of the following are true"
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Alessandro Lazarotti <alazarot>
Component: BRM (Guvnor)Assignee: manstis
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 5.1.0 GA, BRMS 5.2.0.GACC: manstis, rzhang
Target Milestone: ---   
Target Release: future   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/BRMS-547
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When writing rules in the BRMS user interface it was not possible to define sub facts with statements that use multiple field constraints.
Story Points: ---
Clone Of: Environment:
Fedora 12, JDK 1.6, Firefox 3.5.6
Last Closed: 2025-02-10 03:13:56 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:
Bug Depends On: 724436    
Bug Blocks:    

Description Alessandro Lazarotti 2011-01-27 19:37:22 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000005ib4U&sfdc.override=1
securitylevel_name: Public

Is not possible define sub-fields like: Fact ( field.subField == "") using statements like: "Any of the following are true", "The following exists" ore "Any of the followings are true".

The root cause is the same that BRMS-381, the fields are not clickable

Comment 1 Alessandro Lazarotti 2011-01-27 19:41:20 UTC
Link: Added: This issue related GUVNOR-1179


Comment 2 Alessandro Lazarotti 2011-01-27 19:44:12 UTC
Link: Added: This issue depends BRMS-381


Comment 4 Rick Wagner 2011-08-25 13:28:28 UTC
gss_prioritized

Comment 5 lcarlon 2011-09-16 02:03:43 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:
When writing rules in the BRMS user interface it is not possible to define sub facts with statements that use multiple field constraints.

Comment 6 lcarlon 2011-09-19 04:34:43 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 @@
-When writing rules in the BRMS user interface it is not possible to define sub facts with statements that use multiple field constraints.+When writing rules in the BRMS user interface it was not possible to define sub facts with statements that use multiple field constraints.

Comment 7 Zuzana Krejčová 2011-09-22 10:06:30 UTC
It's still not really working, especially not the way the technical note would let the customer believe.

I'm using this model: 
declare SubFact
	field: Integer
end

declare Fact
	subfact: SubFact
end


With a rule:
1) Add Fact, click on the Fact, choose "Multiple field constraint" : "Any of (Or)", click on "any of the following:" in the editor, choose subfact. 
Then try clicking on that subfact to choose its field or bind a variable - it's not possible, not clickable.

2) Click the green plus sign to add a condition and choose "Any of the following are true", similarly to the above case, choose Fact, click it in the editor, but then choose "Add a restriction on a field" : subfact. Click on subfact in the editor.
You can either bind a variable to that fact or choose its field. BUT once you choose some field, subfact isn't clickable anymore. If you choose and insert a field before that, you can bind that to a variable too and once you bind it, it becomes unclickable too.

3) Save the rule, validate and verify - everything seems ok. Create a test scenario - you can't set the subfact.field inside a Fact.

Using BRMS 5.2.0 ER4

Comment 8 manstis 2011-09-23 16:37:00 UTC
This really is a can of worms. I am making progress on resolving all items however the problems that have been reported are what is the effect of the problem rather than the cause.

Comment 9 manstis 2011-09-23 16:51:05 UTC
Clicking an existing field constraint to add further sub-field constraints really is broken something terrible (and indeed probably not the preferred approach anymore - in fact I am in good mind to remove it). I have made a change to allow use of the "Expression Editor" in composite field constraints that solves all you report in 1) and 2). I hope to look at 3) this evening....  The change for 1) and 2) has been committed to .org (project) master branch on github - https://github.com/droolsjbpm/guvnor/commit/5d27a7b88b17d7a94ebe1b64d174f1268557aa73

Comment 10 Ryan Zhang 2011-09-27 06:53:32 UTC
hi, Michael, we would need it back port to 5.2.x branch.

Could you back port it for us and mark it as modified if it has been resolved.

Comment 11 manstis 2011-09-27 11:20:36 UTC
OK, 1) and 2) have been completed and back-ported. 3) remains incomplete. I would suggest 3) is created as a separate issue for post BRMS 5.2 - there is no code in the Test Scenario code-base to support adding sub-field values and hence arguably 3) is an enhancement.

Comment 12 manstis 2011-09-27 11:25:44 UTC
JIRA https://issues.jboss.org/browse/GUVNOR-1416 already exists for 3)

Comment 13 Lukáš Petrovický 2011-09-27 11:30:14 UTC
(In reply to comment #12)
> JIRA https://issues.jboss.org/browse/GUVNOR-1416 already exists for 3)

Let's wait for 5.3 with that one.

Comment 19 Red Hat Bugzilla 2025-02-10 03:13:56 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.