Hello,
Using Guvnors "guided" features you cannot create constructs like this:
HashMap(this["amount"]!=null)
The only solution is to use a free-format DRL fragment (in either the
Guided Rule Editor, Guided Template Editor or Guided Decision Table).
With Guided Templates and Guided Decision Tables you could make the map key
a "template key" so values can be defined elsewhere:
HashMap(this["@{key}"]!=null)
An alternative to a free-format DRL fragment would be to define a DSL. DSLs
can be used in any of the foregoing editors.
With kind regards,
Mike
On 22 March 2013 09:16, Aditi Hardas <aditi.hardas(a)gmail.com> wrote:
Hi Abhinay,
I was also expected the same and still struggling for the right answer .
see
my older post
http://drools.46999.n3.nabble.com/guvnor-5-5-Guided-decision-tables-web-b...
<
http://drools.46999.n3.nabble.com/guvnor-5-5-Guided-decision-tables-web-b...
>
I would like to ask you that according to your first post you have created
a
Hash Map.
Map<String, Integer> map = new HashMap<String,Integer>();
map.put("amount",12);
My DRL is as follows :
when
$h : HashMap(this["amount"]!=null)
then
//something
So did you created that in Guvnor or in hand coded drl file ? How Guvnor
will identified HashMap(this["amount"]!=null) statement without creating a
object of HashMap ?
-----
Aditi
--
View this message in context:
http://drools.46999.n3.nabble.com/Can-an-Object-inside-a-map-be-used-in-g...
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