Generally speaking, if a Fact has not been referenced in the CONDITION it cannot be MODIFIED in the ACTION.<br><br>You can either:-<br><ul><li>Reference in the CONDITION and MODIFY in the ACTION, or</li><li>CREATE in the ACTION</li>
</ul><p>You do not need to define any constraints on a Fact you reference in the CONDITION. IIRC just a non-empty value in the row data will suffice.<br></p>On 13 March 2012 14:01, mihajlo <span dir="ltr">&lt;<a href="mailto:mihajlo.jovanovic@chase.com">mihajlo.jovanovic@chase.com</a>&gt;</span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry, I meant input :=)<br>
<br>
I figured this was possible, as this is how a typical rule engine works.<br>
However I am struggling with the correct syntax for doing this with a<br>
decision table in Drools. I basically have a table in which I want to modify<br>
a fact in the ACTION clause that had not been referenced in any of the<br>
CONDITIONS, and then execute it as follows:<br>
<br>
        public void processRules(Object... facts) {<br>
                StatelessKnowledgeSession session = threadSession.get();<br>
                if (session == null) {<br>
                        logger.debug(&quot;creating/setting stateless session&quot;);<br>
                        session =<br>
knowledgeBase.newStatelessKnowledgeSession();<br>
                        threadSession.set(session);<br>
                } else {<br>
                        logger.debug(&quot;retrieving stateless session&quot;);<br>
                }<br>
<br>
                List factList = new ArrayList();<br>
                factList.addAll(Arrays.asList(facts));<br>
<br>
                session.execute(factList);<br>
        }<br>
<br>
Note that this worked fine by means of declaring a global variable for the<br>
result; however I prefer this new approach.<br>
<br>
Thanks!<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Setting-Non-global-Input-Variable-in-ACTION-Clause-tp3820353p3822263.html" target="_blank">http://drools.46999.n3.nabble.com/Setting-Non-global-Input-Variable-in-ACTION-Clause-tp3820353p3822263.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>