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

Bug 1077212

Summary: Guided rule editor: setting fact field to a bound variable in RHS produces invalid DRL
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: manstis
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.1CC: etirelli, kverlaen, mbiarnes, rrajasek
Target Milestone: CR1   
Target Release: 6.0.1   
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:57:47 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
GRE screenshot none

Description Jiri Locker 2014-03-17 13:25:11 UTC
Created attachment 875492 [details]
GRE screenshot

Description of problem:
>    when
>        $a : Applicant( age < 10 )
>        $test : Test( )
>    then
>        $test.setApplicant( =$a );
>        update( $test );

$test.setApplicant( =$a ); is not valid. Attached screenshot illustrates how to achieve this in GRE.

Actual results:
$test.setApplicant( =$a );

Expected results:
$test.setApplicant( $a );

Comment 1 Jiri Locker 2014-03-17 13:33:20 UTC
Additional info:
- I used Bound variable editor style for the applicant field.
- Same behaviour in 6.0.0 (no regression).
- Workaround: when setting the field value, do not choose Bound variable. Instead of it use Formula editor and simply type the variable name ($a in this case).

Comment 3 Michael 2014-03-18 12:12:22 UTC
Ticket cherry-picked into 6.0.1.CR1. 
Commits:
7932488759ff7e5031030bf6a0f9a77d17d54d5e
db25ddfc4b2ba50cfe758a9ecfe92dd49dfb4010

Comment 4 Jiri Locker 2014-03-24 13:25:58 UTC
Fixed. The resulting DRL now looks as expected.