You don't need an separate BRL Fragment for each line in the DRL. Why not
define a BRL Fragment for this:-
data : RuleData( controlCode == 123, term = <TemplateKey> )
You'll then have a column in which to enter the value of "term". If the
cell the fragment will not be included in the rule.
With kind regards,
Mike
On 16 August 2012 03:08, jasonxzhong <jason.zhong(a)ellucian.com> wrote:
Hi,
I am trying to develop a guide decision table so that each row will
transform to the following rule
rule "..."
when
data : RuleData(
controlCode == 123,
term = "<literal from cell>"
)
then
TermTicket t = new TimeTicket();
t.setTerm(data.getTerm());
t.setSomerValue(...)
insert(t);
end
The condition that tests RuleData.controlCode attribute does not use any
value from the table itself but just a constant "123" so I added a BRL
fragment "controlCode equals to 123". This seems to work as long as this
column is not hidden and the checkbox in the corresponding column is
checked
(by default the box is not checked therefore the condition is not added to
the rule). Since the condition does not require any user provided value it
is rather odd that it needs to be displayed in the table and requires user
to check the box to enable it. Is there a way to get around this or this is
a limitation of the guided decision table?
Similarly in the same rule I want to set the value of TermTicket.term to a
value taken from the RuleData, not from the table itself. Again I can get
this to work by using a free form DRL. However this also requires the
column
itself to be shown in the table and the user needs to check the checkbox in
that column to enable this action.
Any suggestions?
Thanks, Jason
--
View this message in context:
http://drools.46999.n3.nabble.com/Hiding-a-column-in-web-guided-decision-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users