<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Paul Ryan wrote:
<blockquote
 cite="mid:47CD64D7E22C3949A40CA4751EB20E81036F2D554D@boumail.infotrustgroup.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
  </style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal">Hi all,<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Is there a way using the &#8216;from&#8217; constraint to
get
the values of a map(the implementations of java.lang.Map eg HashMap,
TreeMap,
etc) into a constraint parameter, and if so can someone please give an
example.
Below is the way I&#8217;ve been trying, without success, to get a value
based
on a key.</p>
  </div>
</blockquote>
$m : Map()<br>
MyObject(.....) from $m['key']<br>
<br>
We support MVEL notation for the 'from' keyword.<br>
<blockquote
 cite="mid:47CD64D7E22C3949A40CA4751EB20E81036F2D554D@boumail.infotrustgroup.com"
 type="cite">
  <div class="Section1">
  <p class="MsoNormal"><o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">import my.package.MyFact<o:p></o:p></p>
  <p class="MsoNormal">import java.util.Map.Entry<o:p></o:p></p>
  <p class="MsoNormal">rule &#8220;Find with map&#8221;<o:p></o:p></p>
  <p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<o:p></o:p></p>
  <p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fact :
MyFact($paramMap :
paramMap)<o:p></o:p></p>
  <p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $myValue :
Entry(key == &#8220;mykey1&#8221;)
from $paramMap<o:p></o:p></p>
  <p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Then<o:p></o:p></p>
  <p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;">//
Sudo code&#8230;<o:p></o:p></p>
  <p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;use
$myValue.getValue()&gt;<o:p></o:p></p>
  <p class="MsoNormal">end<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">Paul
Ryan<o:p></o:p></span></b></p>
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">Software
Architect<br>
Product Engineering</span></b><b><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;"><br>
  </span></b><b><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">InfoTrust
Group, Inc.</span></b><span
 style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;"><o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span
 style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;"><img
 id="Picture_x0020_1" src="cid:part1.01080201.03060308@codehaus.org"
 alt="Logo FINAL 1-30-08_scaled" height="46" width="173"><o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">500
Discovery Parkway, Suite 200<br>
Superior, CO 80027<br>
  <b>Office</b> (303) 627-6528<o:p></o:p></span></p>
  <p class="MsoNormal"><b><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">Fax</span></b><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">
(303) 666-6711</span><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: navy;"><br>
  </span><b><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">Email</span></b><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: navy;">
  </span><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: blue;"><a
 moz-do-not-send="true" href="mailto:pryan@infotrustgroup.com"><span
 style="color: blue;">pryan@infotrustgroup.com</span></a></span><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: navy;"><br>
  </span><b><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">WEB</span></b><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: navy;">
  </span><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: blue;"><a
 moz-do-not-send="true" href="http://www.infotrustgroup.com/"><span
 style="color: blue;">www.infotrustgroup.com</span></a></span><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;"><o:p></o:p></span></p>
  <p class="MsoNormal"><i><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;"><o:p>&nbsp;</o:p></span></i></p>
  <p class="MsoNormal"><i><span
 style="font-size: 8pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; color: black;">This
e-mail and all information included herein do not constitute
a legal agreement accorded by INFOTRUST GROUP and its affiliates and
subsidiaries.&nbsp; All legal agreements must be formulated in writing by a
legal representative of INFOTRUST GROUP.&nbsp;This email and any files
transmitted with it are confidential and intended solely for the use of
the
individual or entity to whom they are addressed.&nbsp; If you have received
this
e-mail by mistake, please inform us and destroy this e-mail and any
documents
it might contain.&nbsp; Please note that any views or opinions presented in
this email are solely those of the author and do not necessarily
represent
those of the company. Finally, the recipient should check this email
and any
attachments for the presence of viruses. The company accepts no
liability for
any damage caused by any virus transmitted by this email.&nbsp; Thank you
for your
cooperation.<o:p></o:p></span></i></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>