<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<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 name=Generator content="Microsoft Word 14 (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]--><title>CARTE DE VISITE</title><style><!--
/* Font Definitions */
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.E-MailFormatvorlage17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Consolas","serif";
        color:black;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</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 bgcolor=white lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#1F497D;mso-fareast-language:DE'>Exactly! I need to iterate over a bunch of objects/facts in the Working Memory.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE'> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] <b>Im Auftrag von </b>Vincent Legendre<br><b>Gesendet:</b> Freitag, 10. Juni 2011 12:04<br><b>An:</b> Rules Users List<br><b>Betreff:</b> Re: [rules-users] Custom-Operator - No access to FactHandles?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>And why not accessing the object itself directly ?<br>Because the evaluation of one object field depends on others objects in WM ?<br><br>Le 10/06/2011 11:54, Martin, Matthias a écrit&nbsp;: <o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Hello,</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>some of our custom operators need to access already inserted facts at runtime. Therefore we extended <b>org.drools.base.BaseEvaluator</b>. The provide methods, i. e. </span><o:p></o:p></p><p class=MsoNormal style='line-height:200%'><b><span lang=EN-US>public boolean evaluate(InternalWorkingMemory workingMemory, InternalReadAccessor extractor, Object object, &nbsp;FieldValue value)</span></b><span lang=EN-US>, state, amongst others, a parameter &#8220;workingMemory&#8221; of type <b>org.drools.common.InternalWorkingMemory</b>. </span><o:p></o:p></p><p class=MsoNormal style='line-height:200%'><span lang=EN-US>When calling <b>workingMemory.getObjects()</b> we receive a &#8220;UnsupportedOperationException&#8221;. The question is whether it is possible to access facts in a KnwoledgeSession at runtime or not. Alternatively we could provide the objects in question as globals and call workingMemory.getGlobal(), but that seems to me like somewhat bad architecture. </span><o:p></o:p></p><p class=MsoNormal style='line-height:200%'><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='line-height:200%'><span lang=EN-US>Any suggestions are welcome.</span><o:p></o:p></p><p class=MsoNormal style='line-height:200%'><span lang=EN-US>Many thanks,</span><o:p></o:p></p><p class=MsoNormal style='line-height:200%'><span lang=EN-US>-Matthias</span><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>rules-users mailing list<o:p></o:p></pre><pre><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><o:p></o:p></pre><pre><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></pre><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'>-- <br></span><span style='font-size:13.5pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Vincent LEGENDRE</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><br></span><i><span style='font-size:8.5pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>Consultant Sénior</span></i><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><br></span><span style='font-size:4.5pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><br></span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>EURODECISION</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><br></span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";mso-fareast-language:DE'>9A rue de la Porte de Buc 78000 VERSAILLES<br>Tél. : +33 (0)1 39 07 12 40<br>Direct : +33 (0)1 39 07 26 16<br><a href="www.eurodecision.com">www.eurodecision.com</a></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><br><a href="http://www.eurodecision.com/"><span style='text-decoration:none'><img border=0 width=206 height=66 id="_x0000_i1025" src="cid:image001.gif@01CC276B.CDDE3EA0" alt=EURODECISION></span></a><o:p></o:p></span></p></div></div></body></html>