[rules-users] Drools Flow Events Not Working

jawa agohar at gmail.com
Mon Sep 13 08:44:08 EDT 2010


Done some more debugging and It looks like the ProcessInstance is failing
while trying to get process. Here is what I found from the drools 5.1 source
code:

org/drools/process/instance/impl/ProcessInstanceImpl.java

    public Process getProcess() {
        if (this.process == null) {
            this.process = ( Process ) ((InternalRuleBase)
workingMemory.getRuleBase())
                .getProcess(processId);
        }
        return this.process;
    }

And it appears that workingMemory is a transient variable and when I load
the session from db i guess this workingMemory is not being set hence throws
NullPointerException. Here is how it is defined:

private transient InternalWorkingMemory workingMemory;

But still not able to find out the problem executing SignalEventCommand
using session still getting exception:

Exception in thread "main" java.lang.NoSuchMethodError:
org.drools.runtime.StatefulKnowledgeSession.execute(Lorg/drools/command/Command;)Lorg/drools/runtime/ExecutionResults; 


I've also tried to call signalEvent method on Session.

StatefulKnowledgeSession session =
JPAKnowledgeService.loadStatefulKnowledgeSession(3,knowledgeBase, null,
environment);
session.signalEvent("Test", vo);

It signals event but It signals event to all the processes pending in db
instead of just for the process attached with the passed session id (3 in
this case). Any idea why is it doing that?

Thanks
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Events-Not-Working-tp1453738p1465323.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list