[rules-users] Error Inserting events into drools fusion stream

Wolfgang Laun wolfgang.laun at gmail.com
Fri Oct 22 01:46:56 EDT 2010


Normally a Fusion session is created once, possibly initialized with some
static facts,
and then you use the entry point to insert events, call fireAllRules, and
wait for the
next event to arrive from its source. Therefore, keep the session and the
entry point
for repeated use by the last two statements.
-W

On 22 October 2010 06:08, Pankaj Khattar <pankaj.khattar1 at alcatel-lucent.com
> wrote:

>
> Hi,
>
> I am facing the same problem, i have read somewhere that we can use the
> same
> session throughout the application but I'm unable to figure it how?
>
> Also how can we insert events from my application into the same working
> memory entry-point?
>
> Below is the code I'm using please let me know if this is the right way to
> do it
>
> static StatefulKnowledgeSession session;
>
> session  = knowledgeBase.newStatefulKnowledgeSession();
> WorkingMemoryEntryPoint entryPoint =
> session.getWorkingMemoryEntryPoint("NotificationStream");
> entryPoint.insert(new MyReceivedEvent());
> session.fireAllRules();
>
> I'm calling the above code every time a new event is received. Also in the
> finally block I'm calling session.dispose();
>
> While inserting the 2nd event in entry-point I'm getting
> org.drools.RuntimeDroolsException: Unexpected exception executing action
> org.drools.reteoo.PropagationQueuingNode$PropagateAction at 9ff411  Caused
> by:
> java.util.concurrent.RejectedExecutionException.
>
> Can anyone please let me know the right way to do it?
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Error-Inserting-events-into-drools-fusion-stream-tp1746213p1750434.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101022/9d6ee50c/attachment.html 


More information about the rules-users mailing list