<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> <<a href="mailto:ben.cotton@morganstanley.com">ben.cotton@morganstanley.com</a>> 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:
</font><font face="sans-serif" size="1">Wolfgang Laun <<a moz-do-not-send="true" href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></font>
<br>
<font face="sans-serif" color="#5f5f5f" size="1">To:
</font><font face="sans-serif" size="1">Rules Users List
<<a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>>,
</font>
<br>
<font face="sans-serif" color="#5f5f5f" size="1">Date:
</font><font face="sans-serif" size="1">11/05/2012 05:19 AM</font>
<br>
<font face="sans-serif" color="#5f5f5f" size="1">Subject:
</font><font face="sans-serif" size="1">Re: [rules-users]
DROOLs callback API for L-value predicate matching
events</font>
<br>
<font face="sans-serif" color="#5f5f5f" size="1">Sent by:
</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 <<a moz-do-not-send="true" href="mailto:Ben.Cotton@morganstanley.com" target="_blank">Ben.Cotton@morganstanley.com</a>>
wrote:<br>
> Could a solution be as simple as this? Is this
approach to consuming<br>
> "LCHUS_IRS_CURRENCY_RULE" L-value matching events
sound/complete
(and<br>
> not-vulnerable to any race condition?). Is there any
DROOLS
EventListener<br>
> callback API that would be more appropriate to solve
the problem?<br>
><br>
> E.g. I want to be able to log when each of these 5
L-value predicates<br>
> either "MATCHES" or "FAILS TO MATCH" (at the time
of the event)<br>
><br>
> rule "LCHUS_IRS_CURRENCY_RULE" //XLS Item=195<br>
> when<br>
> IRDCurrencyRuleFact(<br>
> productType == "IRS",<br>
> currency=="GBP",<br>
> upfrontFeePaymentDate <
IRDCurrencyRuleFact.terminationDate,<br>
> maturity <= 18275,<br>
>
//unit
= days, i.e. 50 Years<br>
> notional <= 99,999,999,999.99<br>
>
//max Notional<br>
> )<br>
> then<br>
> System.out.println("LCHUS");<br>
> end<br>
><br>
><br>
> Again the objective is to be able to join a
high-resolution logging<br>
> capability wrt to which of the specific 5 L-value
predicates matched.<br>
> Instinctively, to this DROOLs newbie, this approach
seems workable
but not<br>
> ideal ....<br>
><br>
> rule
"LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_1"<br>
> when<br>
> IRDCurrencyRuleFact(productType == "IRS")<br>
> then<br>
>
System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
event 1<br>
> match"); //log event L-value predicate 1 matched<br>
> end<br>
><br>
> rule
"LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_2"<br>
> when<br>
> IRDCurrencyRuleFact(currency=="GBP")<br>
> then<br>
>
System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
event 2<br>
> match"); //log event L-value predicate 2 matched<br>
> end<br>
><br>
> rule
"LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_3"<br>
> when<br>
> IRDCurrencyRuleFact(upfrontFeePaymentDate
<<br>
> IRDCurrencyRuleFact.terminationDate)<br>
> then<br>
>
System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
event 3<br>
> match"); //log event L-value predicate 3 matched<br>
> end<br>
><br>
> rule
"LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_4"<br>
> when<br>
> IRDCurrencyRuleFact(maturity
<= 18275)<br>
> then<br>
>
System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
event 4<br>
> match"); //log event L-value predicate 4 matched<br>
> end<br>
><br>
> rule
"LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_5"<br>
> when<br>
> IRDCurrencyRuleFact(notional
<= 99,999,999,999.99)<br>
> then<br>
>
System.out.println("LCHUS_IRS_CURRENCY_RULE_L-value
event 5<br>
> match"); //log event L-value predicate 5 matched<br>
> end<br>
><br>
><br>
><br>
><br>
><br>
> Ben D Cotton III<br>
> Morgan Stanley & Co.<br>
> OTC Derivatives Clearing Technology<br>
> 1221 AOTA Rockefeller Ctr - Flr 27<br>
> New York, NY 10020<br>
> <a moz-do-not-send="true" href="tel:%28212%29762.9094" value="+12127629094" target="_blank">(212)762.9094</a><br>
> <a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank">ben.cotton@ms.com</a><</tt><a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank"><tt>mailto:ben.cotton@ms.com</tt></a><tt>><br>
><br>
><br>
><br>
><br>
> 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>
> [</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>
> (ISGT)<br>
> Sent: Saturday, November 03, 2012 8:24 AM<br>
> To: <a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
> Cc: O'Brien, Patrick (ISGT)<br>
> Subject: [rules-users] DROOLs callback API for
L-value predicate matching<br>
> events<br>
><br>
> Hi, Can someone please point me to compelling
examples/sample
code of how<br>
> to use a DROOLs callback API for very high-resolution
logging of L-value<br>
> predicate matching events?<br>
><br>
> E.g. I want to be able to log when each of these 5
L-value predicates<br>
> either "MATCHES" or "FAILS TO MATCH" (at the time
of the event)<br>
><br>
> rule "LCHUS_IRS_CURRENCY_RULE" //XLS Item=195<br>
> when<br>
> IRDCurrencyRuleFact(<br>
> productType == "IRS",<br>
> currency=="GBP",<br>
> upfrontFeePaymentDate <
IRDCurrencyRuleFact.terminationDate,<br>
> maturity <= 18275,<br>
>
//unit
= days, i.e. 50 Years<br>
> notional <= 99,999,999,999.99<br>
>
//max Notional<br>
> )<br>
> then<br>
> System.out.println("LCHUS");<br>
> end<br>
><br>
><br>
> Ben D Cotton III<br>
> Morgan Stanley & Co.<br>
> OTC Derivatives Clearing Technology<br>
> 1221 AOTA Rockefeller Ctr - Flr 27<br>
> New York, NY 10020<br>
> <a moz-do-not-send="true" href="tel:%28212%29762.9094" value="+12127629094" target="_blank">(212)762.9094</a><br>
> <a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank">ben.cotton@ms.com</a><</tt><a moz-do-not-send="true" href="mailto:ben.cotton@ms.com" target="_blank"><tt>mailto:ben.cotton@ms.com</tt></a><tt>><br>
><br>
><br>
><br>
> ________________________________<br>
><br>
> NOTICE: Morgan Stanley is not acting as a municipal
advisor and the
opinions<br>
> or views contained herein are not intended to be, and
do not constitute,<br>
> advice within the meaning of Section 975 of the
Dodd-Frank Wall Street<br>
> Reform and Consumer Protection Act. If you have
received this communication<br>
> in error, please destroy all electronic and paper
copies and notify
the<br>
> sender immediately. Mistransmission is not intended
to waive confidentiality<br>
> or privilege. Morgan Stanley reserves the right, to
the extent permitted<br>
> under applicable law, to monitor electronic
communications. This message
is<br>
> subject to terms available at the following link:<br>
> </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>
> please notify us by reply message and we will send
the contents to
you. By<br>
> messaging with Morgan Stanley you consent to the
foregoing.<br>
><br>
><br>
> ________________________________<br>
><br>
> NOTICE: Morgan Stanley is not acting as a municipal
advisor and the
opinions<br>
> or views contained herein are not intended to be, and
do not constitute,<br>
> advice within the meaning of Section 975 of the
Dodd-Frank Wall Street<br>
> Reform and Consumer Protection Act. If you have
received this communication<br>
> in error, please destroy all electronic and paper
copies and notify
the<br>
> sender immediately. Mistransmission is not intended
to waive confidentiality<br>
> or privilege. Morgan Stanley reserves the right, to
the extent permitted<br>
> under applicable law, to monitor electronic
communications. This message
is<br>
> subject to terms available at the following link:<br>
> </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>
> please notify us by reply message and we will send
the contents to
you. By<br>
> messaging with Morgan Stanley you consent to the
foregoing.<br>
><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 & Co.
OTC Derivatives Clearing Technology
1221 AOTA Rockefeller Ctr - Flr 27
New York, NY 10020<p>
(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>