<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<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]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<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.<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:.5in;text-indent:.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:10.0pt;font-family:"Arial","sans-serif";
color:black'>Paul Ryan<o:p></o:p></span></b></p>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Software Architect<br>
Product Engineering</span></b><b><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:black'><br>
</span></b><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>InfoTrust Group, Inc.</span></b><span style='font-size:10.0pt;
font-family:"Arial","sans-serif";color:black'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'><img
width=173 height=46 id="Picture_x0020_1"
src="cid:image001.jpg@01C8E75E.F8448000" alt="Logo FINAL 1-30-08_scaled"><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
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:8.0pt;font-family:"Arial","sans-serif";
color:black'>Fax</span></b><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:black'> (303) 666-6711</span><span style='font-size:8.0pt;font-family:
"Arial","sans-serif";color:navy'><br>
</span><b><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:black'>Email</span></b><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:navy'> </span><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:blue'><a href="mailto:pryan@infotrustgroup.com"><span style='color:blue'>pryan@infotrustgroup.com</span></a></span><span
style='font-size:8.0pt;font-family:"Arial","sans-serif";color:navy'><br>
</span><b><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:black'>WEB</span></b><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:navy'> </span><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:blue'><a href="http://www.infotrustgroup.com/"><span style='color:blue'>www.infotrustgroup.com</span></a></span><span
style='font-size:8.0pt;font-family:"Arial","sans-serif";color:black'><o:p></o:p></span></p>

<p class=MsoNormal><i><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:black'><o:p>&nbsp;</o:p></span></i></p>

<p class=MsoNormal><i><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
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>

</body>

</html>