Hi all,
I have 2 questions about setting a new strategy to the Jess engine.
1) Lets say at a status where the activations have been done, I set a new
strategy to the engine. When I run the engine, are all the activations
then re-ordered according to the new strategy BEFORE any rule is firing?
(It seems to me that this is the case).
2) In my application it is necessary (because of parallel computing) that
I have to change the strategy after the FIRST rule has fired.
What I now think about is to implement a function in my event handler
that changes the strategy when the rule fires (with a seperate variable I
check if this is the first firing):
public void eventHappened(JessEvent je)
{
int type = je.getType();
switch (type)
{
case JessEvent.RESET:
break;
case JessEvent.DEFRULE_FIRED:
control.changeStrategy(id);
break;
...
}
}
Is it save to do this? In other words: are all the remaining activations
re-ordered according to the new strategy before the next rule will fire?
Thanks and greetings from Hamburg
Wilfried
--------------------------------------------------------------------
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].
--------------------------------------------------------------------