Nick,

   I see. In any case, Drools will not allow you to do that without recompiling the knowledge base, but, why don't you simply make your "MyFunctions" class be a delegate to your actual functions? So, whenever you reload your fuctions, all you need to do is rewire things inside your MyFunctions class... isolated and clean... no need to have things rewired in Drools side... sounds much lighter than any other approach, even if it was possible to do the rewire in Drools, it would certainly be heavier...

   Just an idea...
  
   Edson

2009/10/14 Nicholas Hemley <nic.hemley@sidonis.com>

Edson,

 

Actually, I only use custom action classes in the RHS (see below)

 

e.g.

rule TEARDOWN_3004865719

                when

                                child0:MyClass (

                                                state1 == 0,

                                                state2 == 0

                                )

                then

                                MyFunctions.performOperation( "TEARDOWN _3004865719",

                                                 "message",

                                                 child0,

                                                 true );

                end

 

The classes referenced in the LHS will always stay the same.

 

So if we want to re-load the class MyFunctions (since these custom actions may be updated), then I currently have to re-create the StatefulKnowledgeSession from a new KnowledgeBase, etc. so that the findClass() method is called on MyClassLoader.

 

Cheerio,

Nic

 

Nicholas Hemley

Senior Developer

Sidonis | Powering a New Generation of Service Assurance


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com