<div>Hi,</div><div><br></div><div>I need to calculate the min time for a set of &quot;jobs&quot; inserted in working mermory to know wich job is going to be finished first.</div><div><br></div><div>Is there any way to obtain within a rule the current facts of some type to pass then to a function/method? </div>
<div>somethin like this:</div><div><br></div><div>Another idea to acomplish this?</div><div><br></div><div><br></div><div>gobal MyService myservice</div><div><br></div><div>rule &quot;cmdCheckTime&quot; ruleflow-group &quot;comprobarExistencias&quot;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>when</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>Job(time = eval(myService.getMinTime( &lt;jobs in working memory &gt;))</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span>then </div><div><span class="Apple-tab-span" style="white-space:pre">                </span>go, go, go...</div><div><br></div><div>end</div><div><br></div><div>Thank you</div>