<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Ask Ozar.net - Recent questions and answers in BRMS</title>
<link>http://ask.ozar.net/qa/computers-tablets-smartphones/software/brms</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: JRules / IBM ODM BAL question</title>
<link>http://ask.ozar.net/18/jrules-ibm-odm-bal-question?show=21#a21</link>
<description>

&lt;p&gt;
	I solved this by writing the following methods in the source code of the XOM object:&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;font-family: courier new,courier,monospace&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #000000; font-size: small;&quot;&gt; BigDecimal &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;amount&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;font-family: courier new,courier,monospace&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;strong&gt;public&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;/span&gt;BigDecimal getAmount() {&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;return&lt;/span&gt;&lt;/strong&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;amount&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;


&lt;p style=&quot;text-align: left;&quot;&gt;
	&lt;span style=&quot;font-family: courier new,courier,monospace&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #000000; font-size: small;&quot;&gt; BigDecimal getCeilBasedCalc(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #000000; font-size: small;&quot;&gt; z, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #000000; font-size: small;&quot;&gt; x, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt; y, BigDecimal n) {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; ( &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; BigDecimal((z-x) / y ).multiply(n) ).setScale(0, RoundingMode.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;CEILING&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;);&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;


&lt;p style=&quot;text-align: left;&quot;&gt;
	&lt;span style=&quot;font-family: courier new,courier,monospace&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; calculateBasedOnCeil(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; z, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; x, &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; y, BigDecimal n) {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;amount&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; = ( &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt; BigDecimal((z-x) / y ).multiply(n) ).setScale(0, RoundingMode.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: small;&quot;&gt;CEILING&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;);&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;


&lt;p style=&quot;text-align: left;&quot;&gt;
	&lt;span style=&quot;font-size: small;&quot;&gt;And then verbalized the above in the BOM.&lt;/span&gt;&lt;/p&gt;</description>
<category>BRMS</category>
<guid isPermaLink="true">http://ask.ozar.net/18/jrules-ibm-odm-bal-question?show=21#a21</guid>
<pubDate>Thu, 31 Oct 2013 07:45:47 +0000</pubDate>
</item>
<item>
<title>Answered: The difference between RetePlus, Sequential and Fastpath algorithms in IBM ODM</title>
<link>http://ask.ozar.net/19/difference-between-reteplus-sequential-fastpath-algorithms?show=20#a20</link>
<description>

&lt;p&gt;
	See the following at IBM InfoCenter for Webspehere Operational Decision Management:
&lt;br&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	Choosing an execution mode:&lt;/p&gt;


&lt;p&gt;
	&lt;a href=&quot;http://pic.dhe.ibm.com/infocenter/dmanager/v8r0/index.jsp?topic=%2Fcom.ibm.wodm.dserver.rules.designer.run%2Foptimizing_topics%2Ftpc_opt_choose_execmode.html&quot; rel=&quot;nofollow&quot;&gt;http://pic.dhe.ibm.com/infocenter/dmanager/v8r0/index.jsp?topic=%2Fcom.ibm.wodm.dserver.rules.designer.run%2Foptimizing_topics%2Ftpc_opt_choose_execmode.html&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	RetePlus in simple terms allows objects in working memory (WM) to be inserted/deleted/updated, then evaluated and matched with the conditions on the rules. Any rules that do match get put into an agenda and then fired. If those rules change data in working memory, this could potentially fire more rules whose conditions match the changed objects. The cycle continues until there are no more rules that match the objects in WM.&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	Sequential pretty much runs through the rules in the specified order, firing off rules whose conditions match the objects then exits. Any changes to data will not be re-evaluated and will not fire further rules.&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	There is also Fastpath, that sits in between. It uses the condition matching capability of RetePlus (for performance reasons), but does not re-evaluate changed data (so is not cyclical).&lt;/p&gt;</description>
<category>BRMS</category>
<guid isPermaLink="true">http://ask.ozar.net/19/difference-between-reteplus-sequential-fastpath-algorithms?show=20#a20</guid>
<pubDate>Thu, 31 Oct 2013 07:30:25 +0000</pubDate>
</item>
</channel>
</rss>