Hello,
This question is related to using Java interface to Jess.
I have following situation. For a fact, I have more than one rules
that
can get activated. Some of these rules have fewer number of patterns on
LHS
compare to other rules. Even though more than one rule can potentially
get
activated, in the context of the problem, the one with the more number
of
matching patterns implies it is more specific to the situation and
should
be the only one that should get activated. I think defining a new
strategy
object that says activate only the rule with the most matched patterns
would
be appropriate in this case. However, instead of defining a new
strategy, I
am trying to take a simplistic approach by listing all the activations
(rete.listActivations()) and iterating over the activations and finding
the
rule with the most patterns mathed on the LHS. However, the problem
comes because
the methods like Activation.fire(Rete r) has 'package' access. Before
modifying the
source code and getting into some unforseen behaviour I wanted to find
out if
there is any other alternative way to achieve this? If not, what could
happen if I modify the source code to make Activation.fire(Rete r)
public and after getting
a reference to the desired Activation instance (the one which
corresponds to the
Rule with the most LHS patterns) use it to fire the rule?
thanks,
-Bijal
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------