<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">It will be published soon.<div><br></div><div>Big thanks to wolfgang for his excellent work.</div><div><br></div><div>Mark<br><div><div>On 7 Dec 2012, at 12:52, <a href="mailto:ben.cotton@ms.com">ben.cotton@ms.com</a> &lt;<a href="mailto:ben.cotton@morganstanley.com">ben.cotton@morganstanley.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><br>
      Did this white paper ever get published at <a href="http://jboss.org">jboss.org</a>?<br>
      <br>
      On 11/5/2012 1:10 PM, Wolfgang Laun wrote:<br>
    </div>
    <blockquote cite="mid:CANaj1Ldw8RaN-c1SE-hjykDbviBCdx3VQxYO389OEXEQcY0BnQ@mail.gmail.com" type="cite"> A White Paper containing a similar sceenario (and
      other material) will be out soon on some RedHat/JBoss site.<br>
      <br>
      <div class="gmail_quote"><br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <br>
          <font face="sans-serif" color="#5f5f5f" size="1">From: &nbsp; &nbsp; &nbsp;
            &nbsp;</font><font face="sans-serif" size="1">Wolfgang Laun &lt;<a moz-do-not-send="true" href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</font>
          <br>
          <font face="sans-serif" color="#5f5f5f" size="1">To: &nbsp; &nbsp; &nbsp;
            &nbsp;</font><font face="sans-serif" size="1">Rules Users List
            &lt;<a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;,
          </font>
          <br>
          <font face="sans-serif" color="#5f5f5f" size="1">Date: &nbsp; &nbsp; &nbsp;
            &nbsp;</font><font face="sans-serif" size="1">11/05/2012 05:19 AM</font>
          <br>
          <font face="sans-serif" color="#5f5f5f" size="1">Subject: &nbsp; &nbsp;
            &nbsp; &nbsp;</font><font face="sans-serif" size="1">Re: [rules-users]
            DROOLs callback API for L-value predicate &nbsp; &nbsp; &nbsp; &nbsp;matching
            events</font>
          <br>
          <font face="sans-serif" color="#5f5f5f" size="1">Sent by: &nbsp; &nbsp;
            &nbsp; &nbsp;</font><font face="sans-serif" size="1"><a moz-do-not-send="true" href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a></font>
          <br>
          <hr noshade="noshade">
          <br>
          <br>
          <br>
          <tt>"Learning the reason for failure to match"
              is the title of a section in my<br>
              boot camp you missed at this year's IntelliFest a couple
              of weeks ago.<br>
              <br>
              You are getting close to the solution, but here's the
              outline of the<br>
              rule programming design pattern:<br>
              <br>
              Write one rule (high salience) to create an auxiliary fact
              (Aux),<br>
              containing a reference to the fact under investigation
              (Crf) and a<br>
              Set.<br>
              <br>
              Write one rule each, combining Aux and Crf, restricting
              the latter with
              one<br>
              of the required property values/range. On the RHS, add an<br>
              identification to the set component of Aux. DO NOT
              MODIFY/UPDATE.<br>
              <br>
              Write another rule (low salience) combining Aux and Crf
              and see what<br>
              Aux contains in the Set. Retract Aux.<br>
              <br>
              -W<br>
              <br>
              <br>
              <br>
              <br>
              On 05/11/2012, Cotton, Ben &lt;<a moz-do-not-send="true" href="mailto:Ben.Cotton@morganstanley.com" target="_blank">Ben.Cotton@morganstanley.com</a>&gt;
              wrote:<br>
              &gt; Could a solution be as simple as this? &nbsp;Is this
              approach to consuming<br>
              &gt; "LCHUS_IRS_CURRENCY_RULE" L-value matching events
              sound/complete
              (and<br>
              &gt; not-vulnerable to any race condition?). &nbsp;Is there any
              DROOLS
              EventListener<br>
              &gt; callback API that would be more appropriate to solve
              the problem?<br>
              &gt;<br>
              &gt; E.g. &nbsp;I want to be able to log when each of these 5
              L-value predicates<br>
              &gt; either "MATCHES" or "FAILS TO MATCH" (at the time
              of the event)<br>
              &gt;<br>
              &gt; rule "LCHUS_IRS_CURRENCY_RULE" &nbsp;//XLS Item=195<br>
              &gt; &nbsp; &nbsp; when<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp;IRDCurrencyRuleFact(<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; productType == "IRS",<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; currency=="GBP",<br>
              &gt; upfrontFeePaymentDate &lt;
              IRDCurrencyRuleFact.terminationDate,<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maturity &lt;= 18275,<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//unit
              = days, i.e. 50 Years<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notional &lt;= 99,999,999,999.99<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //max Notional<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp;)<br>
              &gt; &nbsp; &nbsp; then<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("LCHUS");<br>
              &gt; end<br>
              &gt;<br>
              &gt;<br>
              &gt; Again the objective is to be able to join a
              high-resolution logging<br>
              &gt; capability wrt to which of the specific 5 L-value
              predicates matched.<br>
              &gt; Instinctively, to this DROOLs newbie, this approach
              seems workable
              but not<br>
              &gt; ideal ....<br>
              &gt;<br>
              &gt; rule
              "LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_1"<br>
              &gt; &nbsp; &nbsp; when<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp;IRDCurrencyRuleFact(productType == "IRS")<br>
              &gt; &nbsp; &nbsp;then<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp;System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
              event 1<br>
              &gt; match"); &nbsp;//log event &nbsp;L-value predicate 1 matched<br>
              &gt; end<br>
              &gt;<br>
              &gt; rule
              "LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_2"<br>
              &gt; &nbsp; &nbsp; when<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp;IRDCurrencyRuleFact(currency=="GBP")<br>
              &gt; &nbsp; &nbsp;then<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp;System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
              event 2<br>
              &gt; match"); //log event &nbsp;L-value predicate 2 matched<br>
              &gt; end<br>
              &gt;<br>
              &gt; rule
              "LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_3"<br>
              &gt; &nbsp; &nbsp; when<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IRDCurrencyRuleFact(upfrontFeePaymentDate
              &lt;<br>
              &gt; IRDCurrencyRuleFact.terminationDate)<br>
              &gt; &nbsp; &nbsp; then<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp;System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
              event 3<br>
              &gt; match"); //log event &nbsp;L-value predicate 3 matched<br>
              &gt; end<br>
              &gt;<br>
              &gt; rule
              "LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_4"<br>
              &gt; &nbsp; &nbsp; when<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IRDCurrencyRuleFact(maturity
              &lt;= 18275)<br>
              &gt; &nbsp; &nbsp; then<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp;System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
              event 4<br>
              &gt; match"); //log event &nbsp;L-value predicate 4 matched<br>
              &gt; end<br>
              &gt;<br>
              &gt; rule
              "LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_5"<br>
              &gt; &nbsp; &nbsp; when<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IRDCurrencyRuleFact(notional
              &lt;= 99,999,999,999.99)<br>
              &gt; &nbsp; &nbsp; then<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp;System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
              event 5<br>
              &gt; match"); //log event &nbsp;L-value predicate 5 matched<br>
              &gt; end<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt; Ben D Cotton III<br>
              &gt; Morgan Stanley &amp; Co.<br>
              &gt; OTC Derivatives Clearing Technology<br>
              &gt; 1221 AOTA Rockefeller Ctr - Flr 27<br>
              &gt; New York, NY 10020<br>
              &gt; <a moz-do-not-send="true" href="tel:%28212%29762.9094" value="+12127629094" target="_blank">(212)762.9094</a><br>
              &gt; <a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank">ben.cotton@ms.com</a>&lt;</tt><a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank"><tt>mailto:ben.cotton@ms.com</tt></a><tt>&gt;<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt; From: <a moz-do-not-send="true" href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a><br>
              &gt; [</tt><a moz-do-not-send="true" href="mailto:rules-users-bounces@lists.jboss.org" target="_blank"><tt>mailto:rules-users-bounces@lists.jboss.org</tt></a><tt>]
              On Behalf Of Cotton, Ben<br>
              &gt; (ISGT)<br>
              &gt; Sent: Saturday, November 03, 2012 8:24 AM<br>
              &gt; To: <a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
              &gt; Cc: O'Brien, Patrick (ISGT)<br>
              &gt; Subject: [rules-users] DROOLs callback API for
              L-value predicate matching<br>
              &gt; events<br>
              &gt;<br>
              &gt; Hi, &nbsp;Can someone please point me to compelling
              examples/sample
              code &nbsp;of how<br>
              &gt; to use a DROOLs callback API for very high-resolution
              logging of L-value<br>
              &gt; predicate matching events?<br>
              &gt;<br>
              &gt; E.g. &nbsp;I want to be able to log when each of these 5
              L-value predicates<br>
              &gt; either "MATCHES" or "FAILS TO MATCH" (at the time
              of the event)<br>
              &gt;<br>
              &gt; rule "LCHUS_IRS_CURRENCY_RULE" &nbsp;//XLS Item=195<br>
              &gt; &nbsp; &nbsp; when<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp;IRDCurrencyRuleFact(<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; productType == "IRS",<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; currency=="GBP",<br>
              &gt; upfrontFeePaymentDate &lt;
              IRDCurrencyRuleFact.terminationDate,<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maturity &lt;= 18275,<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//unit
              = days, i.e. 50 Years<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notional &lt;= 99,999,999,999.99<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
              &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //max Notional<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp;)<br>
              &gt; &nbsp; &nbsp; then<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("LCHUS");<br>
              &gt; end<br>
              &gt;<br>
              &gt;<br>
              &gt; Ben D Cotton III<br>
              &gt; Morgan Stanley &amp; Co.<br>
              &gt; OTC Derivatives Clearing Technology<br>
              &gt; 1221 AOTA Rockefeller Ctr - Flr 27<br>
              &gt; New York, NY 10020<br>
              &gt; <a moz-do-not-send="true" href="tel:%28212%29762.9094" value="+12127629094" target="_blank">(212)762.9094</a><br>
              &gt; <a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank">ben.cotton@ms.com</a>&lt;</tt><a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank"><tt>mailto:ben.cotton@ms.com</tt></a><tt>&gt;<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt; ________________________________<br>
              &gt;<br>
              &gt; NOTICE: Morgan Stanley is not acting as a municipal
              advisor and the
              opinions<br>
              &gt; or views contained herein are not intended to be, and
              do not constitute,<br>
              &gt; advice within the meaning of Section 975 of the
              Dodd-Frank Wall Street<br>
              &gt; Reform and Consumer Protection Act. If you have
              received this communication<br>
              &gt; in error, please destroy all electronic and paper
              copies and notify
              the<br>
              &gt; sender immediately. Mistransmission is not intended
              to waive confidentiality<br>
              &gt; or privilege. Morgan Stanley reserves the right, to
              the extent permitted<br>
              &gt; under applicable law, to monitor electronic
              communications. This message
              is<br>
              &gt; subject to terms available at the following link:<br>
              &gt; </tt><a moz-do-not-send="true" href="http://www.morganstanley.com/disclaimers" target="_blank"><tt>http://www.morganstanley.com/disclaimers</tt></a><tt>
              If you cannot access these links,<br>
              &gt; please notify us by reply message and we will send
              the contents to
              you. By<br>
              &gt; messaging with Morgan Stanley you consent to the
              foregoing.<br>
              &gt;<br>
              &gt;<br>
              &gt; ________________________________<br>
              &gt;<br>
              &gt; NOTICE: Morgan Stanley is not acting as a municipal
              advisor and the
              opinions<br>
              &gt; or views contained herein are not intended to be, and
              do not constitute,<br>
              &gt; advice within the meaning of Section 975 of the
              Dodd-Frank Wall Street<br>
              &gt; Reform and Consumer Protection Act. If you have
              received this communication<br>
              &gt; in error, please destroy all electronic and paper
              copies and notify
              the<br>
              &gt; sender immediately. Mistransmission is not intended
              to waive confidentiality<br>
              &gt; or privilege. Morgan Stanley reserves the right, to
              the extent permitted<br>
              &gt; under applicable law, to monitor electronic
              communications. This message
              is<br>
              &gt; subject to terms available at the following link:<br>
              &gt; </tt><a moz-do-not-send="true" href="http://www.morganstanley.com/disclaimers" target="_blank"><tt>http://www.morganstanley.com/disclaimers</tt></a><tt>
              If you cannot access these links,<br>
              &gt; please notify us by reply message and we will send
              the contents to
              you. By<br>
              &gt; messaging with Morgan Stanley you consent to the
              foregoing.<br>
              &gt;<br>
              _______________________________________________<br>
              rules-users mailing list<br>
              <a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
            </tt><a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank"><tt>https://lists.jboss.org/mailman/listinfo/rules-users</tt></a><tt><br>
            </tt>
          <br>
          -----------------------------------------
          The information contained in this communication (including any
          attachments hereto) is confidential and is intended solely for
          the
          personal and confidential use of the individual or entity to
          whom
          it is addressed. If the reader of this message is not the
          intended
          recipient or an agent responsible for delivering it to the
          intended
          recipient, you are hereby notified that you have received this
          communication in error and that any review, dissemination,
          copying,
          or unauthorized use of this information, or the taking of any
          action in reliance on the contents of this information is
          strictly
          prohibited. If you have received this communication in error,
          please notify us immediately by e-mail, and delete the
          original
          message. Thank you <br>
          _______________________________________________<br>
          rules-users mailing list<br>
          <a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
          <a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
          <br>
        </blockquote>
        <br>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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>
    <br>
    <pre class="moz-signature" cols="72">-- 

Ben D Cotton III
Morgan Stanley &amp; Co.
OTC Derivatives Clearing Technology
1221 AOTA Rockefeller Ctr - Flr 27
New York, NY 10020&lt;p&gt;
(212)762.9094
<a class="moz-txt-link-abbreviated" href="mailto:ben.cotton@ms.com">ben.cotton@ms.com</a></pre>
  </div>

_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></body></html>