[rules-users] No errors thrown from KnowledgeAgent
De Rooms Brecht
bderooms at vub.ac.be
Wed Jul 31 08:19:17 EDT 2013
Hello David and thanks for responding.
I know it supports these event listeners and I use them. In my program,
I have two knowledge agents and the first one (preprocessing) will read
the file, preprocess a DRL and then write a second modified DRL file in
a folder that is monitored by the second one. When I modify the original
DRL file *(1.* in prints below*)* monitored by the preprocessing agent,
everything works fine and the rule is triggered*(**2.)*. However, when I
delete a file *(**3.)*, the knowledgeAgent just blocks after
AfterChangeSetAppliedEvent and does not do anything anymore.. If I send
new data in the knowledgeAgent it does not react anymore.
I would expect to get a stacktrace of what went wrong but I do not get
any info besides of the systemeventlistener or knowledgeagentlistener.
Is there any way I can get a stacktrace?
Kind Regards,
De Rooms Brecht
_*1. Resources Changed => Modified: [[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]*_
/ eventListener 1:::
==>[BeforeResourceProcessedEvent(RESOURCE_REMOVED): [FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]//
// eventListener 1:::
==>[AfterResourceProcessedEvent(RESOURCE_REMOVED): [FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]//
// eventListener 1::: ==>[AfterChangeSetProcessedEvent:
ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
resourcesModified=[[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
knowledgeDefinitionsRemoved=[]}]//
// eventListener 1::: ==>[ResourceCompilationFailedEvent:
org.drools.builder.impl.KnowledgeBuilderImpl at 70d0d127]//
// eventListener 1::: ==>[KnowledgeBaseUpdatedEvent:
org.drools.impl.KnowledgeBaseImpl at 49669be]//
// eventListener 1::: ==>[AfterChangeSetAppliedEvent:
ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
resourcesModified=[[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
knowledgeDefinitionsRemoved=[]}]//
// eventListener 2::: ==>[BeforeChangeSetAppliedEvent:
ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
resourcesModified=[[FileResource
file='knowledge\packaged\test.brules.testRule.drl']],
knowledgeDefinitionsRemoved=[]}]//
// eventListener 2:::
==>[BeforeResourceProcessedEvent(RESOURCE_REMOVED): [FileResource
file='knowledge\packaged\test.brules.testRule.drl']]//
// eventListener 2:::
==>[AfterResourceProcessedEvent(RESOURCE_REMOVED): [FileResource
file='knowledge\packaged\test.brules.testRule.drl']]//
// eventListener 2::: ==>[AfterChangeSetProcessedEvent:
ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
resourcesModified=[[FileResource
file='knowledge\packaged\test.brules.testRule.drl']],
knowledgeDefinitionsRemoved=[]}]//
// eventListener 2::: ==>[KnowledgeBaseUpdatedEvent:
org.drools.impl.KnowledgeBaseImpl at 11c834d1]/
_*2. Rules are triggered when the PKG file its knowledge is updated:*_
/ Changed This Rule::: Got Event: TestEvent( number=5,
message=doesDynamicEventTypeWork? )//
// Changed This Rule::: Got Event: TestEvent( number=4,
message=doesDynamicEventTypeWork? )//
// Changed This Rule::: Got Event: TestEvent( number=2,
message=doesDynamicEventTypeWork? )//
// Changed This Rule::: Got Event: TestEvent( number=1,
message=doesDynamicEventTypeWork? )//
// Changed This Rule::: Got Event: TestEvent( number=2,
message=doesDynamicEventTypeWork? )//
// Changed This Rule::: Got Event: TestEvent( number=1,
message=doesDynamicEventTypeWork? )//
// Changed This Rule::: Got Event: TestEvent( number=2,
message=doesDynamicEventTypeWork? )//
// Changed This Rule::: Got Event: TestEvent( number=1,
message=doesDynamicEventTypeWork? )//
//
// eventListener 2::: ==>[AfterChangeSetAppliedEvent:
ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
resourcesModified=[[FileResource
file='knowledge\packaged\test.brules.testRule.drl']],
knowledgeDefinitionsRemoved=[]}]//
// eventListener 1::: ==>[BeforeChangeSetAppliedEvent:
ChangeSetImpl{resourcesRemoved=[[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
resourcesAdded=[], resourcesModified=[],
knowledgeDefinitionsRemoved=[]}]//
// eventListener 1::: ==>[BeforeChangeSetProcessedEvent:
ChangeSetImpl{resourcesRemoved=[[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
resourcesAdded=[], resourcesModified=[], knowledgeDefinitionsRemoved=[]}]/
_*3. *__*Resources Changed => *__*Removed: [[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]*_
/ eventListener 1:::
==>[BeforeResourceProcessedEvent(RESOURCE_MODIFIED): [FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]//
// eventListener 1:::
==>[AfterResourceProcessedEvent(RESOURCE_MODIFIED): [FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]//
// eventListener 1::: ==>[AfterChangeSetProcessedEvent:
ChangeSetImpl{resourcesRemoved=[[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
resourcesAdded=[], resourcesModified=[], knowledgeDefinitionsRemoved=[]}]//
// eventListener 1::: ==>[KnowledgeBaseUpdatedEvent:
org.drools.impl.KnowledgeBaseImpl at 49669be]//
// eventListener 1::: ==>[AfterChangeSetAppliedEvent:
ChangeSetImpl{resourcesRemoved=[[FileResource
file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
resourcesAdded=[], resourcesModified=[], knowledgeDefinitionsRemoved=[]}]/
_**_.... and then it was quiet....
Op 31/07/2013 09:42, Davide Sottara schreef:
> The KA logs to a SystemEventListener, and supports a dedicated event
> listener for
> additions/updates/etc...
>
> You can do:
>
> kagent.setSystemEventListener( new PrintStreamSystemEventListener() );
> kagent.addEventListener( new DebugKnowledgeAgentEventListener( ) );
>
>
>
> On 07/30/2013 01:55 AM, De Rooms Brecht wrote:
>> Dear Drools users,
>>
>> I have been testing with the KnowledgeAgent from version 5.4 and 5.5. It
>> monitors a changeset and is set to incrementally build the
>> knowledgebase. I noticed that it sometimes crashes but never throws out
>> errors. This happens for example when I define a type two times and when
>> I remove a file. Does anyone experience similar behaviour and has an
>> idea of how I could see the errors? I already tried to check the errors
>> by building it myself using a knowledgebuilder before I update the file
>> that the knowledgeAgent monitors but that's quite a dirty solution.
>>
>> Kind Regards,
>> De Rooms Brecht
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
> _______________________________________________
> 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/20130731/4ff48d40/attachment.html
More information about the rules-users
mailing list