Bug 1209397 - Unable to use 'drools' variable in Guided Rules
Summary: Unable to use 'drools' variable in Guided Rules
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: manstis
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-07 09:40 UTC by Anton Giertli
Modified: 2019-06-13 08:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-04 19:22:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1195241 0 high CLOSED kcontext usage in Free Form DRL of RHS breaks the Guided Rule 2021-02-22 00:41:40 UTC

Internal Links: 1195241

Description Anton Giertli 2015-04-07 09:40:32 UTC
Description of problem:
As per the documentation
http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/index.html#d0e9051

drools is predefined variable, similar to kcontext which is available for usage  - in RHS for example.

business-central is able to resolve kcontext but can't resolve drools variable,

Version-Release number of selected component (if applicable):
BPMS 6.0.3+rp#2

How reproducible:
always

Steps to Reproduce:
1. Create Guided Rule with drools variable used in RHS, i.e.:

1.	|	import java.lang.Number;
2.	|	
3.	|	rule "MyGuidedRule"
4.	|	    dialect "mvel"
5.	|	    when
6.	|	        eval( true )
7.	|	    then
8.	|	        drools.setFocus( "whatever" );
9.	|	end

2. Save/validate/F5/re-open
3. Popup with following content is presented:

"ERROR: Could not find type for variable drools"

Actual results:
It is not possible to use drools variable in RHS in Guided Rule

Expected results:
It is possible to use drools variable in RHS in Guided Rule


Additional info:

The workaround is to use kcontext variable. Unfortunately, that's not possible due to
https://bugzilla.redhat.com/show_bug.cgi?id=1195241

So the workaround is to use plain DRL. Please have BZ-1195241 in mind when working on this.

Comment 2 Kris Verlaenen 2015-04-07 14:01:29 UTC
'drools' was deprecated in favor of 'kcontext' since v6.

Comment 3 Edson Tirelli 2015-09-04 19:22:49 UTC
As Kris mentioned, "drools" was deprecated and the problem with "kcontext" is solved. I am closing this ticket.


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