Drools automatically Deleting Events from KieSession

52 views
Skip to first unread message

pbish...@gmail.com

unread,
Sep 24, 2021, 4:31:25 AM9/24/21
to Drools Usage
Hi All,

I have a drools kiesession which has multiple entry points (20-50). I am facing an issue where at some point all the events inside that entry point is getting deleted automatically and the Fact count in the entry point is showing as 1.I want suggestions on how to debug this. Can anyone help me on this. 

Please let me know if need any further explaination.

Regards,
Bishnu

Richard Bourner

unread,
Sep 24, 2021, 12:55:58 PM9/24/21
to drools...@googlegroups.com
You can set up an implementation of RuleRuntimeEventListener to be notified when retracts happen and on what facts.


--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/5fdc5407-3e12-410f-9857-ee2dccca6423n%40googlegroups.com.

pbish...@gmail.com

unread,
Sep 26, 2021, 10:49:33 PM9/26/21
to Drools Usage
Thank you for your reply. I have added the event listener and waiting for some logs. Could you tell me how to find the root cause of why all of a sudden all the objects from the entry point is getting deleted ? Is there a way to debug this?

Regards,
Bishnu Shankar Pandey

Richard Bourner

unread,
Sep 28, 2021, 12:28:03 AM9/28/21
to drools...@googlegroups.com
That listener is useful for debugging as you will get notified for such events and identify how the corresponding event got triggered for a specific fact.
Facts are not retracted from Working Memory without a good reason. You might want to check in your rules actions and in your client code if there is no explicit retract/delete from WM.
One other possibility is if you are in a Complex Event Processing scenario, where facts can expire based on their duration and the time-based comparisons in your rules conditions. If your facts do not match any temporal constraints, the rule engine may automatically retract them from WM.


Reply all
Reply to author
Forward
0 new messages