Re: [rules-users] Drools 5.5 : Problems with big rules file (~1.5Meg)

2013-09-17 Thread Nicolas Héron
Hi,
Tell me if your need more help.
Cheers
Nicolas Héron


2013/9/17 peter.kutzner [via Drools] 

> Hi Nicolas
>
> No, i don't create any objects within the rules.
> I only update some fields.
>
> I created the rules with Guvnor and also testcases for each rule and my
> workflow.
> And all of them are green and do not produce infinite loops.
> But after running some testcases, i got the same errors as in my test
> programm.
>
> Usually the exception that is thrown referes to:
> *Exception in thread "main" Exception executing consequence for rule
> "MyRule_01" in com.myrules: java.lang.RuntimeException: cannot invoke
> method: update
> at
> org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
>
> ...
> Caused by: java.lang.NoSuchMethodError:
> com.mymodel.MyEnum.compareTo(Lcom/mymodel/MyEnum;)I
> at ConditionEvaluator6e5efa52c5ec4cb3b427987c361bed94.evaluate(Unknown
> Source) ...*
>
> My mentioned testloop contains only five different sets of data and the
> same dataset that passes the
> first loops (3 to 9) crash on the next one. And looping with the same
> input data i got the save behvouir.
> Using different input data different rules cause the problem, same data
> same rule.
>
> Ok, i'll try to add a debug listener.
>
> Creating smaller rules files will be my next approach. But i think then i
> need to create seperate knowledgebase (for each rule chunk). That makes it
> difficult to process the workflow from one KB to the next KB (i have some
> big decision tables and i need to pass every of them to get my results)
>
> Regards
> Peter
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file-1-5Meg-tp4025974p4025996.html
>  To start a new topic under Drools: User forum, email
> ml-node+s46999n47000...@n3.nabble.com
> To unsubscribe from Drools, click 
> here
> .
> NAML
>




-
Nicolas Héron
--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file-1-5Meg-tp4025974p4025997.html
Sent from the Drools: User forum mailing list archive at Nabble.com.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Drools 5.5 : Problems with big rules file (~1.5Meg)

2013-09-17 Thread Davide Sottara
Can you extract and post the rule called "MyRule_01"?
I'd also check the class MyEnum.. is it an enum as the name
might imply? Is it implementing Comparable
and/or trying to redefine the method compareTo?
Davide



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file-1-5Meg-tp4025974p4025998.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Implementation of my use case - what am I doing wrong?

2013-09-17 Thread Elran Dvir
Thanks for the quick response.

I have some more questions:

1. As I understand it, the timestamp attribute should be long type 
representing the milliseconds since January 1, 1970, 00:00:00 GMT. Am I right?
2. As I understand it, the duration attribute  should be in 
milliseconds. I fixed it accordingly. Am I right?
3. When I replaced "(this meets $ce || this during $ce || this metby 
$ce)" with "$ce.startTimestamp <= startTimestamp , endTimestamp <= 
$ce.endTimestamp"
I got the following drools compile exceptions:

Unable to Analyse Expression $ce.startTimestamp:
[Error: unable to resolve method using strict-mode: 
com.checkpoint.correlation.impl.drools.CorrelatedEvent.startTimestamp()]
[Near : {... $ce.startTimestamp }]
^
[Line: 61, Column: 28] : [Rule name='Create Port Scan Event - 
update']

Unable to Analyse Expression $ce.startTimestamp <= 
startTimestamp:
[Error: unable to resolve method using strict-mode: 
com.checkpoint.correlation.impl.drools.CorrelatedEvent.startTimestamp()]
[Near : {... $ce.startTimestamp <= startTimesta }]
^
[Line: 61, Column: 28] : [Rule name='Create Port Scan Event - 
update']

Unable to Analyse Expression endTimestamp <= $ce.endTimestamp:
[Error: unable to resolve method using strict-mode: 
com.checkpoint.correlation.impl.drools.CpLog.endTimestamp()]
[Near : {... endTimestamp <= $ce.endTimesta }]
^
[Line: 61, Column: 28] : [Rule name='Create Port Scan Event - 
update']

Unable to Analyse Expression $ce.startTimestamp:
[Error: unable to resolve method using strict-mode: 
com.checkpoint.correlation.impl.drools.CorrelatedEvent.startTimestamp()]
[Near : {... $ce.startTimestamp }]

   Why?
4. I tested  my working implementation of temporal relation in rule 
"Create Port Scan Event - update" ("this after $ce.getStartTime() , this before 
$ce.getEndTime()") .
I inserted a connection log and fired the rules every second. I 
have 25 logs with the same "src" and "dst", but each has different (serial) 
"port" and "marker".
I print the rule fired and the port set of logs triggering it.
I got this behavior: for the second and third "rounds" (after 10 
seconds and 20 seconds), the first rule process logs already processed by the 
second rule.

   Output example:
rule fired: Create Port Scan Event - update
portSet: [10, 7, 6, 5, 4, 9, 8, 11, 12]

rule fired: Create Port Scan Event
portSet: [13, 11, 12]

   I understand this behavior, so I changed the order of conditions in 
the LHS of the first rule ("not CorrelatedEvent..." to be the second):
$log : CpLog() //get all the logs in the last 5 seconds
not CorrelatedEvent(getName() == "portScan" , 
fieldsMap.get("src") == $log.fieldsMap.get("src") , fieldsMap.get("dst") == 
$log.fieldsMap.get("dst"))
accumulate( CpLog( this after[0s,5s] $log, 
fieldsMap.get("src") == $log.fieldsMap.get("src") , fieldsMap.get("dst") == 
$log.fieldsMap.get("dst"), $port : fieldsMap.get("port"));
$portSet : collectSet($port);
$portSet.size > 2 )
accumulate( CpLog( this after[0s,5s] $log, fieldsMap.get("src") 
== $log.fieldsMap.get("src") , fieldsMap.get("dst") == 
$log.fieldsMap.get("dst"), $marker : fieldsMap.get("marker"));
$markerSet : collectSet($marker))

   But then I get the following output for the first 4 logs:
rule fired: Create Port Scan Event
portSet: []

rule fired: Create Port Scan Event - update
portSet: [13, 11, 12]

   Why is that? Where the first 3 events disappeared? How "portSet" is 
empty with the condition  $portSet.size > 2? 

Thanks a lot.

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: Sunday, September 15, 2013 8:08 PM
To: Rules Users List
Subject: Re: [rules-users] Implementation of my use case - what am I doing 
wrong?

On 15/09/2013, Elran Dvir  wrote:

> my questions:
>
> 1)  If I have only one stream of data , can I omit the use of entry
> point and insert logs to the session ? Or the use of entry points is 
> mandatory in Drools Fusion?

Yes. No. An entry point is just an additional attribute added "on the fly", 
where you don't have a source identification in the pojo.

>
> 2)   When I tested it with matching data, rule "Create Port Scan Event -
> update" was n

[rules-users] gives error while retracting an object

2013-09-17 Thread Ganesh
Hi Team,

I am using drools-guvnor 5.4 version and designer 2.1 version,

I am calling an drools object from web service
While retracting an object I am getting
classCastException,"*java.lang.boolean cannot be cast to
org.drools.spi.activation* "

I am using session.retract(droolsobject);-Every time I got the error in this
line

This issue rise very often,


I think this issue is due to increase on load on object ,As I found this is
the reason while I search in INTERNET

Can you please tell me how to solve this


Regards
Ganesh N  Neelekani







--
View this message in context: 
http://drools.46999.n3.nabble.com/gives-error-while-retracting-an-object-tp4026000.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Implementation of my use case - what am I doing wrong?

2013-09-17 Thread Wolfgang Laun
On 17/09/2013, Elran Dvir  wrote:
> Thanks for the quick response.
>
> I have some more questions:
>
>   1. As I understand it, the timestamp attribute should be long type
> representing the milliseconds since January 1, 1970, 00:00:00 GMT. Am I
> right?

Not necessarily. The interpretation of this long value is up to you -
it could mean days since the foundation of Rome (753 BC).

>   2. As I understand it, the duration attribute  should be in 
> milliseconds. I
> fixed it accordingly. Am I right?

Use the same unit as the timestamp.

>   3. When I replaced "(this meets $ce || this during $ce || this metby 
> $ce)"
> with "$ce.startTimestamp <= startTimestamp , endTimestamp <=
> $ce.endTimestamp"
>   I got the following drools compile exceptions:
>
>   Unable to Analyse Expression $ce.startTimestamp:
>   [Error: unable to resolve method using strict-mode:
> com.checkpoint.correlation.impl.drools.CorrelatedEvent.startTimestamp()]
>   [Near : {... $ce.startTimestamp }]
>   ^
>   [Line: 61, Column: 28] : [Rule name='Create Port Scan Event - 
> update']
>
>   Unable to Analyse Expression $ce.startTimestamp <= 
> startTimestamp:
>   [Error: unable to resolve method using strict-mode:
> com.checkpoint.correlation.impl.drools.CorrelatedEvent.startTimestamp()]
>   [Near : {... $ce.startTimestamp <= startTimesta }]
>   ^
>   [Line: 61, Column: 28] : [Rule name='Create Port Scan Event - 
> update']
>
>   Unable to Analyse Expression endTimestamp <= $ce.endTimestamp:
>   [Error: unable to resolve method using strict-mode:
> com.checkpoint.correlation.impl.drools.CpLog.endTimestamp()]
>   [Near : {... endTimestamp <= $ce.endTimesta }]
>   ^
>   [Line: 61, Column: 28] : [Rule name='Create Port Scan Event - 
> update']
>
>   Unable to Analyse Expression $ce.startTimestamp:
>   [Error: unable to resolve method using strict-mode:
> com.checkpoint.correlation.impl.drools.CorrelatedEvent.startTimestamp()]
>   [Near : {... $ce.startTimestamp }]
>
>  Why?

Do you have fields startTimestamp and endTimestamp?

>   4. I tested  my working implementation of temporal relation in rule 
> "Create
> Port Scan Event - update" ("this after $ce.getStartTime() , this before
> $ce.getEndTime()") .
[snip]

>
>  Why is that? Where the first 3 events disappeared? How "portSet" is
> empty with the condition  $portSet.size > 2?

Sorry, you've lost me here. I can't see what's going on from this
unorganized set of snippets - and please don't suppose that people
keep old mails or have the time to dig in the archives.

-W

>
> Thanks a lot.
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun
> Sent: Sunday, September 15, 2013 8:08 PM
> To: Rules Users List
> Subject: Re: [rules-users] Implementation of my use case - what am I doing
> wrong?
>
> On 15/09/2013, Elran Dvir  wrote:
>
>> my questions:
>>
>> 1)  If I have only one stream of data , can I omit the use of entry
>> point and insert logs to the session ? Or the use of entry points is
>> mandatory in Drools Fusion?
>
> Yes. No. An entry point is just an additional attribute added "on the fly",
> where you don't have a source identification in the pojo.
>
>>
>> 2)   When I tested it with matching data, rule "Create Port Scan Event
>> -
>> update" was never fired. When I replaced "(this meets $ce || this
>> during $ce
>> || this metby $ce)" with "this after $ce.getStartTime() , this before
>> $ce.getEndTime()" everything worked fine.
>> Why?
>
> Just take the constraints and replace the temporal operator by its
> definition in the "Fusion" manual and use a little elementary math:
>
> A meets  || A during B || A metby B
> becomes
>abs( B.startTimestamp - A.endTimestamp ) == 0 ||
>B.startTimestamp < A.startTimestamp && A.endTimestamp < B.endTimestamp ||
> abs( A.startTimestamp - B.endTimestamp ) == 0 becomes
>   ...
>
>
>>
>> 3)  I tried to use sliding windows in  rule "Create Port Scan Event"
>> and
>> an exception was thrown at runtime. I decided to use "this
>> after[0s,5s] $log" instead. Is it correct?
>
> A sliding window is not the same as the temporal relation of two events. If
> the rule does what it ought to, I'd say, yes, it is correct.
>
>>
>> 4)  Is my basic Implementation correct?
>
> A bit much to ask, don't you think?
>
> -W
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> Email secured by Check Point
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/ru

Re: [rules-users] Implementation of my use case - what am I doing wrong?

2013-09-17 Thread Elran Dvir
Thanks again.

I don't have startTimestamp and endTimestamp fields. I assume these fields are 
created on runtime bases on duration and timestamp attributes. Isn't it?
If I need to define them myself, what is the advantage of defining  timestamp 
and duration attributes?

I'll try to organize the fourth question:
I am trying to identify a port scan event: 
Basic event is connection log. For each combination 
of source_ip and destination_ip, detect a port scan event,
if over 5 seconds there were more than 2 connection logs with 
different ports .
The event will stay open for 10 seconds and an update will be 
sent for any new port detected. Every update will contain the count of 
connection logs combining it and their id ("marker").

This is my drl file:

package test;

import correlation.impl.drools.Log
import correlation.impl.drools.CorrelatedEvent

global correlation.server.EventsHandler externalEventsHandler;

declare Log
  @role( event)
end

declare CorrelatedEvent
@role( event)
@timestamp( getTimestamp().getTime() )
@expires( 10s )
@duration( getDuration() )
end

// this rule will create a "Port Scan" event if none exist for this group-by 
values
rule "Create Port Scan Event"
dialect "java"  
no-loop   
when
  $log : Log() from entry-point "Log stream" //get all the logs in the last 5 
seconds
  accumulate( Log( this after[0s,5s] $log, fieldsMap.get("src") == 
$log.fieldsMap.get("src") , fieldsMap.get("dst") == $log.fieldsMap.get("dst"), 
$port : fieldsMap.get("port")) from entry-point "Log stream";
$portSet : collectSet($port);
$portSet.size > 2 )
  accumulate( Log( this after[0s,5s] $log, fieldsMap.get("src") == 
$log.fieldsMap.get("src") , fieldsMap.get("dst") == $log.fieldsMap.get("dst"), 
$marker : fieldsMap.get("marker")) from entry-point "Log stream";
$markerSet : collectSet($marker))
  not CorrelatedEvent(getName() == "portScan" , fieldsMap.get("src") == 
$log.fieldsMap.get("src") , fieldsMap.get("dst") == $log.fieldsMap.get("dst"))
then
  System.out.println(drools.getRule().getName());

  CorrelatedEvent $ce = new CorrelatedEvent();
  $ce.setName("portScan");
  $ce.setEventsHandler(externalEventsHandler);
  $ce.setDurationInSec(10);
  $ce.fieldsMap.put("src", $log.fieldsMap.get("src"));
  $ce.fieldsMap.put("dst", $log.fieldsMap.get("dst"));
  $ce.endUpdate($markerSet);

  insert($ce);
end

rule "Create Port Scan Event - update"
dialect "java"  
no-loop
when
  $ce: CorrelatedEvent(getName() == "portScan")
  accumulate( Log(fieldsMap.get("src") == $ce.fieldsMap.get("src") , 
fieldsMap.get("dst") == $ce.fieldsMap.get("dst") , $port : 
fieldsMap.get("port") , this after $ce.getStartTime() , this before 
$ce.getEndTime()) from entry-point "Log stream";
$portSet : collectSet($port);
$portSet.size > 0 )
  accumulate( Log(fieldsMap.get("src") == $ce.fieldsMap.get("src") , 
fieldsMap.get("dst") == $ce.fieldsMap.get("dst") , $marker : 
fieldsMap.get("marker") , this after $ce.getStartTime() , this before 
$ce.getEndTime()) from entry-point "Log stream";
$markerSet : collectSet($marker))
then
  System.out.println(drools.getRule().getName());

  modify( $ce ) {endUpdate($markerSet)}
end

I test it like this:
I insert a connection log and fire the rules every second. I have 25 logs with 
the same "src" and "dst", but each has different (serial) "port" and "marker".
So after 12-13 logs, I expect to identify a new event with another consecutive 
3 logs.
In each rule's RHS, I print the rule fired and the port set of logs triggering 
it.
With existing implementation, I see the following output at 14th second:

rule fired: Create Port Scan Event - update
portSet: [10, 7, 6, 5, 4, 9, 8, 11, 12]

rule fired: Create Port Scan Event
portSet: [13, 11, 12]

As we can see, the first rule processes logs already processed by the second 
rule.
After examining the first rule, I understood this behavior. 
I decided to change the order of conditions in the LHS of the first rule by 
moving "not CorrelatedEvent..." to be the second condition. 
But then I get the following output after the first 4 logs:

rule fired: Create Port Scan Event
portSet: []

rule fired: Create Port Scan Event - update
portSet: [4]

Why is that? Where the first 3 events "disappeared"? How $portSet is empty with 
the condition  $portSet.size > 2? 

Thanks a lot.

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: Tuesday, September

[rules-users] using ruleflow group and agenda group together

2013-09-17 Thread ashish6276
HI

 In my POC I Created 4 ruleflow groups. Each group has rules which are from
2 different agenda groups. if 2 rules which are in same ruleflowgroup have
everything similar in when condition except agendagroup the flow is stoping
there. If i am making the when condition different for rules in one ruleflow
group then end to end flow is working fine.what can be the reason for this.



--
View this message in context: 
http://drools.46999.n3.nabble.com/using-ruleflow-group-and-agenda-group-together-tp4026004.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] gives error while retracting an object

2013-09-17 Thread Davide Sottara
It reminds me of a bug, could you try 5.5.0.Final or 5.6.0-SNAPSHOT?
Even better, could you post a reproducer test case for your issue?
Thanks
Davide


On 09/17/2013 02:02 AM, Ganesh wrote:
> Hi Team,
>
> I am using drools-guvnor 5.4 version and designer 2.1 version,
>
> I am calling an drools object from web service
> While retracting an object I am getting
> classCastException,"*java.lang.boolean cannot be cast to
> org.drools.spi.activation* "
>
> I am using session.retract(droolsobject);-Every time I got the error in this
> line
>
> This issue rise very often,
>
>
> I think this issue is due to increase on load on object ,As I found this is
> the reason while I search in INTERNET
>
> Can you please tell me how to solve this
>
>
> Regards
> Ganesh N  Neelekani
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/gives-error-while-retracting-an-object-tp4026000.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

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


Re: [rules-users] No errors thrown from KnowledgeAgent

2013-09-17 Thread Davide Sottara
I'll take a look and get back to you
Thanks
Davide

On 09/17/2013 01:51 PM, De Rooms Brecht wrote:
> Dear Drools users,
> Apparently it was not caused by the previously mentioned fix.
> Sometimes I still had a KnowledgeAgent in my server that doesn't
> respond anymore which seems to be caused by a mistake in the DRL file.
> I started to investigate the source code of KnowledgeAgentImpl and
> KnowledgeBaseImpl and recompiled them to add some prints. Finally I
> tracked it until AbstractRuleBase.addPackages.
>
> There is a giant Try-final block and I noticed by adding prints that
> it stopped somewhere in the middle. When it does fail, my
> KnowledgeAgent stops working completely.
> The try-final seemed to be the only place for me where an exception
> might be ignored so I added a catch clause.
> As a result, the error report of my drl file was nicely printed and my
> agent didn't crash:
>
> *org.drools.RuntimeDroolsException: Unable to resolve class 'int' for
> global 'RULES_MATCHED'
> at
> org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:818)
> at
> org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:615)
> at
> org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472)
> at
> org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:153)
> at
> org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1173)
> at
> org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:1058)
> at
> org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:738)
> at
> org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:259)
> at
> org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1357)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> *
> Maybe there is a reason for this missing catch so I am not sure
> whether I fixed it and broke something else ( eg. maybe I should undo
> a part of the operations before I continue).
> Is there anyone who knows this code and who can help me?
>
> Extra information:
> - I use Drools 5.5 from the Maven repository.
> - my agent configuration:
> agentConf.setProperty("drools.agent.newInstance",
> "false");
>
> agentConf.setProperty("drools.agent.useKBaseClassLoaderForCompiling",
> "true");
>
>
> Kind Regards,
> De Rooms Brecht
>
> Op 31/07/2013 14:45, De Rooms Brecht schreef:
>> The bug was caused by one of the InputStreams that was not closed
>> properly which caused the knowledgeAgent to block.
>> I think my issues are solved now.
>>
>> Thanks for looking into this.
>> Kind Regards,
>>
>> Op 31/07/2013 14:19, De Rooms Brecht schreef:
>>> 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=[[Fil

[rules-users] CEP out of order or missing events

2013-09-17 Thread rgupta12
Can CEP detect these?




--
View this message in context: 
http://drools.46999.n3.nabble.com/CEP-out-of-order-or-missing-events-tp4026011.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] No errors thrown from KnowledgeAgent

2013-09-17 Thread De Rooms Brecht

Dear Drools users,

Apparently it was not caused by the previously mentioned fix. Sometimes 
I still had a KnowledgeAgent in my server that doesn't respond anymore 
which seems to be caused by a mistake in the DRL file.
I started to investigate the source code of KnowledgeAgentImpl and 
KnowledgeBaseImpl and recompiled them to add some prints. Finally I 
tracked it until AbstractRuleBase.addPackages.


There is a giant Try-final block and I noticed by adding prints that it 
stopped somewhere in the middle. When it does fail, my KnowledgeAgent 
stops working completely.
The try-final seemed to be the only place for me where an exception 
might be ignored so I added a catch clause.
As a result, the error report of my drl file was nicely printed and my 
agent didn't crash:


*org.drools.RuntimeDroolsException: Unable to resolve class 'int' for 
global 'RULES_MATCHED'
at 
org.drools.common.AbstractRuleBase.mergePackage(AbstractRuleBase.java:818)
at 
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:615)
at 
org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472)
at 
org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:153)
at 
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1173)
at 
org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:1058)
at 
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:738)
at 
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:259)
at 
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1357)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:722)
*
Maybe there is a reason for this missing catch so I am not sure whether 
I fixed it and broke something else ( eg. maybe I should undo a part of 
the operations before I continue).

Is there anyone who knows this code and who can help me?

Extra information:
- I use Drools 5.5 from the Maven repository.
- my agent configuration:
agentConf.setProperty("drools.agent.newInstance", "false");
agentConf.setProperty("drools.agent.useKBaseClassLoaderForCompiling", 
"true");



Kind Regards,
De Rooms Brecht

Op 31/07/2013 14:45, De Rooms Brecht schreef:
The bug was caused by one of the InputStreams that was not closed 
properly which caused the knowledgeAgent to block.

I think my issues are solved now.

Thanks for looking into this.
Kind Regards,

Op 31/07/2013 14:19, De Rooms Brecht schreef:

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@70d0d127]//
//eventListener 1::: ==>[KnowledgeBaseUpdatedEvent: 
org.drools.impl.KnowledgeBaseImpl@49669be]//

Re: [rules-users] Guvnor 5.5.0.Final Web decision table's advanced enum is not working.

2013-09-17 Thread Soumya.plavaga
I have raised a bug as a JIRA task. Following is the bug url -

https://issues.jboss.org/browse/GUVNORSOA-62

Can you please take a look.

Regards,

Soumya



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-5-0-Final-Web-decision-table-s-advanced-enum-is-not-working-tp4025675p4026021.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.5.0.Final Web decision table's advanced enum is not working.

2013-09-17 Thread Michael Anstis
Thanks.

JIRA Project "GUVNOR" would have been better, as requested. It's likely to
be missed in "GUVNORSOA".

Sent on the move
On 18 Sep 2013 07:14, "Soumya.plavaga"  wrote:

> I have raised a bug as a JIRA task. Following is the bug url -
>
> https://issues.jboss.org/browse/GUVNORSOA-62
>
> Can you please take a look.
>
> Regards,
>
> Soumya
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Guvnor-5-5-0-Final-Web-decision-table-s-advanced-enum-is-not-working-tp4025675p4026021.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] rule flow execution.

2013-09-17 Thread ashish6276
Hi

   My ruleflowgroup contains 2 rules which have different agendagroup
defined for them. If i make when condition of both the rules same the flow
execution stops here only instead of going to next ruleflowgroup. I am not
understanding why this is happening.



--
View this message in context: 
http://drools.46999.n3.nabble.com/rule-flow-execution-tp4026023.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.5.0.Final Web decision table's advanced enum is not working.

2013-09-17 Thread Soumya.plavaga
Thanks mantis. I have created a new ticket under Guvnor project and closed
the previous one under GuvnorSOA. Following is the jira url -

https://issues.jboss.org/browse/GUVNOR-2049



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-5-0-Final-Web-decision-table-s-advanced-enum-is-not-working-tp4025675p4026024.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.5.0.Final Web decision table's advanced enum is not working.

2013-09-17 Thread Michael Anstis
Thanks

Sent on the move
On 18 Sep 2013 07:53, "Soumya.plavaga"  wrote:

> Thanks mantis. I have created a new ticket under Guvnor project and closed
> the previous one under GuvnorSOA. Following is the jira url -
>
> https://issues.jboss.org/browse/GUVNOR-2049
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Guvnor-5-5-0-Final-Web-decision-table-s-advanced-enum-is-not-working-tp4025675p4026024.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users