<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:x="urn:schemas-microsoft-com:office:excel" 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)">
<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;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:273173947;
        mso-list-type:hybrid;
        mso-list-template-ids:619346570 -679184210 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-start-at:5;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:1449161425;
        mso-list-type:hybrid;
        mso-list-template-ids:-1473193740 134807575 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l1:level1
        {mso-level-number-format:alpha-lower;
        mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</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 lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hello folk. <o:p></o:p></p>

<p class=MsoNormal>I am trying to work out the best way to use drools for an
application where I have :<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>A domain of @30 fairly complex policy rules each of
which has a Boolean outcome (Fired or Not)<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>A domain of @100 &#8220;audiences&#8221; who apply different subsets
of the policy rules and make their own &#8220;Decision&#8221; based on the policies that
have fired.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I am very keen:<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo4'><![if !supportLists]><span
style='mso-list:Ignore'>a)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>NOT to duplicate the Policy rules themselves<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo4'><![if !supportLists]><span
style='mso-list:Ignore'>b)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>To make mapping of audience &amp; policy to decision as
simple as possible &#8211; ideally through a table<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo4'><![if !supportLists]><span
style='mso-list:Ignore'>c)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>To keep all decision data in the same repository for
uniform version control<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>My thinking is that I&#8217;d have a flow, first execute the
policy rules as one group and save results in working memory and then use these
results in an audience-specific way.<o:p></o:p></p>

<p class=MsoNormal><br>
I get stuck at this second step as I cannot find a compact way to handle the
mapping of Audience/Policy to Decision. Logically what I need to achieve is as
follows. E.g. for audience 1, if policy 1 fires, we decide to refer. (If more
than one has fired, decline trumps refer).<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>Audience&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; policy1&nbsp;&nbsp;&nbsp; policy2&nbsp;&nbsp;&nbsp;
policy3&nbsp;&nbsp;&nbsp; policy4&nbsp;&nbsp;&nbsp; ...<o:p></o:p></span></b></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>audience1</span></b><span
style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;refer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
refer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; decline&nbsp;&nbsp;&nbsp;
(n/a)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>audience2</span></b><span
style='font-family:"Courier New"'>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(n/a)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
decline&nbsp;&nbsp;&nbsp; decline&nbsp;&nbsp;&nbsp;
(n/a)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>...<o:p></o:p></span></b></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Clearly I could do this outside Guvnor but then the UI would
be outside Guvnor &amp; the data would be separated from the drools jcr repo.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I hoped to achieve a rule table as follows (fairly compact)
but this would require DISJUNCTION between cols<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>Audience&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; policy1&nbsp;&nbsp;&nbsp; policy2&nbsp;&nbsp;&nbsp;
policy3&nbsp;&nbsp;&nbsp; policy4&nbsp;&nbsp; Action<o:p></o:p></span></b></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>audience1</span></b><span
style='font-family:"Courier New"'> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true&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;
refer<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>audience1
&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;t</span></b><span
style='font-family:"Courier New"'>rue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
decline<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'>audience2</span></b><span
style='font-family:"Courier New"'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
decline<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-family:"Courier New"'><o:p>&nbsp;</o:p></span></b></p>

<p class=MsoNormal>If I broke out a rule for every combination of audience and
policy this would get very long.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Any smart ideas? Thanks in advance to anyone who spares the
time to think on this one!<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Rich<o:p></o:p></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>PS. I attempted to post this about
3 hours ago but believe I made a mistake. Sorry if it comes through as a
duplicate<o:p></o:p></span></p>

</div>

</body>

</html>