[rules-users] Does Drools contains encryption?

2012-10-22 Thread skatta1986
Hi,

Could any one tell me if there is any encryption in Drools.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Does-Drools-contains-encryption-tp4020411.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] Drools scalability (performance) in numbers.

2012-07-11 Thread skatta1986
Hi,

Please can any one help me out in finding the Drools performance. I wanted
to know its scalabilty.

What is the Drools Maximum capacity (No. of Facts/second) in Complex Event
Processing w.r.t any particular Hardware/OS. 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-scalability-performance-in-numbers-tp4018592.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] using Drools global variables inside operator timer(int: s)

2012-04-30 Thread skatta1986
Hi,

I want a global variable inside a timer instead of hard coding.

- 

ksession.setGlobal( "timeout", new Integer(10)); 

---

*
Improper (not working) rule: *

global Integer timeout; 

rule "tmeout case" 
timer( int: timeout.intValue() s ) 
when 
 $request : EventRecord(eventType == "EVENT_REGISTER", user ==
"katta") from entry-point "AggStream" 
and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
"katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream") 

 then 
  System.out.println("-- timeout for user : "+ $request.getUser() ); 
end 
-- 

This new rule doesn't give any error but it is giving unexpected result. 

For example if a fire only one EventRecord(eventType == "EVENT_REGISTER",
user == "katta") into the working memory, then after 10seconds I should get
timeout as per my requirement. 

But for the above rule as soon as I fire the EventRecord it is giving as
timeout. 


Please help me in this regard 


--
View this message in context: 
http://drools.46999.n3.nabble.com/using-Drools-global-variables-inside-operator-timer-int-variable-name-s-tp3950828.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 variables

2012-04-24 Thread skatta1986
what about the paramaters of timer( int:  ? ) 
?

timer(int : 10s) --> is working properly
but timer(int :  s ) --> not working 

-
working Rule:

rule "tmeout case"
timer( int: 10s )
when
 $request : EventRecord(eventType == "EVENT_REGISTER", user ==
"katta") from entry-point "AggStream" 
and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
"katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")

 then
  System.out.println("-- timeout for user : "+ $request.getUser() );
end
---

Now I want to replace value "10" given in the above rule with a global
variable.

-

ksession.setGlobal( "timeout", new Integer(10));


Improper (not working) rule:
global Integer timeout;

rule "tmeout case"
timer( int: timeout.intValue() s )
when
 $request : EventRecord(eventType == "EVENT_REGISTER", user ==
"katta") from entry-point "AggStream" 
and not (EventRecord( eventType == "EVENT_RESPONSE", ", user ==
"katta", this after[ 0s, 10s ] $request ) from entry-point "AggStream")

 then
  System.out.println("-- timeout for user : "+ $request.getUser() );
end
--

This new rule doesn't give any error but it is giving unexpected result.

For example if a fire only one EventRecord(eventType == "EVENT_REGISTER",
user == "katta") into the working memory, then after 10seconds I should get
timeout.

But for the new rule as soon as I fire the EventRecord it is giving as
timeout.


Please help me in this regard






--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-variables-tp3935404p3936009.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] Drools variables

2012-04-24 Thread skatta1986
Hi,

Could you please answer my queries:
1. Can we create int variable inside LHS (when)? If yes please give me an
example
2. I have a gobal variable which I want to use in timer(int :  s)
and also in after[0s,  s)
timer is accepting global variable but after is giving error.

[74,200]: [ERR 102] Line 74:200 mismatched input 'after' in rule
"EVENT_SUCCESS"
[0,0]: Parser returned a null Package

Please help out me in this. I would like to use a global variable which can
be changed at runtime.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-variables-tp3935404p3935404.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] please provide a rule for events timeout cases

2012-04-24 Thread skatta1986
thanks for the reply its giving expected results

--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3935376.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] please provide a rule for events timeout cases

2012-04-19 Thread skatta1986
Could you please help out me in this...

modified rules: But it is giving thread exception at runtime

rule event_success_case 
 when 
$req : EventRecord( type=EventRequest, user="katta" ) 
and $resp : EventRecord( type=EventResponseSuccess, user="katta",  this
after[0s, 10s] $req ) 
and ( not (EventRecord( type=EventResponseSuccess, user="katta",  this
after[0s, 10s] $req , this before[0s, 10s] $resp)))
#and ( not (EventRecord( type=EventResponseSuccess, user="katta", $req
overlaps this, this overlaps $resp) ))
 then 
   System.out.println("Success case for user " + $req.getUser()); 
retract($req); 
 end 
 
rule event_failure_case 
 when 
$req : EventRecord( type=EventRequest, user="katta" ) 
and EventRecord( type=EventResponseFailure, user="katta",  this
after[0s, 10s] $req ) 
and ( not (EventRecord( type=EventResponseFailure, user="katta",  this
after[0s, 10s] $req , this before[0s, 10s] $resp)))
#and ( not (EventRecord( type=EventResponseFailure, user="katta", $req
overlaps this, this overlaps $resp) ))
 then 
   System.out.println("Failed case for user " + $req.getUser()); 
   retract($req); 
 end 

--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3923831.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] please provide a rule for events timeout cases

2012-04-19 Thread skatta1986
Hi,

Now time out is working fine. 

But facing issues for correlating success and failure events which doesnot
have unique id. I want to correlate an event request followed by its
immediate event response.

Ex: Consider the events in below order
EventRecord( type=EventRequest, user="katta" ) 
EventRecord( type=EventResponseFailure, user="katta" ) 

EventRecord( type=EventRequest, user="katta" ) 
EventRecord( type=EventResponseSuccess, user="katta" ) 

Rules: 

rule event_success_case 
when 
   $req : EventRecord( type=EventRequest, user="katta" ) 
   and EventRecord( type=EventResponseSuccess, user="katta",  this after[0s,
10s] $req ) 
then 
  System.out.println("Success case for user " + $req.getUser());
   retract($req);
end

rule event_failure_case 
when 
   $req : EventRecord( type=EventRequest, user="katta" ) 
   and EventRecord( type=EventResponseFailure, user="katta",  this after[0s,
10s] $req ) 
then 
  System.out.println("Failed case for user " + $req.getUser());
  retract($req);
end

In the above example I don't have any unique identity to correlate request
and response. I need to correlate only based on events order. 


In the above example events order is EventRequest --> EventResponseFailure
and then EventRequest --> EventResponseSuccess. So my expected output is:
Failed case for user katta
Success case for user katta

But I am getting below response:
Success case for user katta
Success case for user katta

First EventRequest and second EventRequest are correlating with second
response EventResponseSuccess as this response is within 0 to 10sec for both
events. 

Note: I am getting expected result only when I send few events. If I insert
around 50 events at time into Working Memory, I face this kind of unexpected
result.

I need to work on live trafic, where I receive hurends of messages per
second.



--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3922235.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] please provide a rule for events timeout cases

2012-04-16 Thread skatta1986
Hi, Thanks for the response..

This is working fine.. But I have a query on the rule:
rule no_response 
   timer( int: 10s ) 
when 
   EventRecord( type=EventRequest, id=1 ) 
   not EventRecord( type=EventResponse, id=1 ) 

In general timer means executing a thread for every specified time period
interval. But in our case, one time would be enough for an event. In the
above rule my query is - after timeout case (i.e., firstime 10 seconds from
the EventRequest), timer thread will be closed or will it be still running?

Second Query is:

Consider the below Success rule:
rule event_success_case 
 when 
   EventRecord( type=EventRequest, id=1 ) 
   and EventRecord( type=EventResponse, id=1 ) 

With "no_response" rule, for every EventRequest there is a timer thread
running for every 10Sec. Second rule "event_success_case" looks for its
EventResponse. Suppose with in 10 seconds there is a response then
"event_success_case" rule is run. Now I would like to close the timer thread
because it uses my system memory. Please let me know if this is possible.


--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3914382.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] please provide a rule for events timeout cases

2012-04-16 Thread skatta1986
Hi,

For the first time even I have tried the same. But it doesn't work. 

I need to correlate the events on live. I am using fire rule until hault
(ksession.fireUntilHalt()).

EventRecord(type=EventRequest, id=1) 
not EventRecord(type=EventResponse, id=1, this after [1s,10s])

This rule doesn't work because when EventRecord(type=EventRequest, id=1) hit
working memory, this rule also looks for EventRecord(type=EventResponse,
id=1). As the EventResponse doesn't the working memory, "not" logic become
true and executing the R.H.S part as soon as EventRequest arrives. This is
not waiting for 10seconds time interval.


--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3914047.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] please provide a rule for events timeout cases

2012-04-13 Thread skatta1986
Hi,

I would like to write a rule for events timeout case. 

Consider the events EventRecord(type=EventRequest, id=1) and
EventRecord(type=EventResponse, id=1).
I have written rules (in .drl file) for correlting the event request with
event response. 

Now I would like to write timeout case. Suppose
EventRecord(type=EventRequest, id=2) is not followed by its response. If we
doesn't recieve response within 10 seconds, then it is considered as timeout
case.
I tried to use timers but it doen't work as it is not allowing me write
inside when (LHS) pattern. 

Is there any other way to find timeout cases?



--
View this message in context: 
http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3907955.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] is there any 'followed by' in Drools as we have in esper

2012-04-11 Thread skatta1986
Actually I have tried this operator "after", but doesn't work properly as the
events are inserted into working memory one by one within fraction of
seconds. 

Consider EventRecords EventRecord(name=katta, eventType=REQUEST, id=1),
EventRecord(name=katta, eventType=EVENT_UN_AUTHORIZED, id=1) and
EventRecord(name=katta, eventType=REQUEST, id=2)

Drool:
when
($eventReq : EventRecord(eventType == "EVENT_REQUEST", respRecv ==
"false") from entry-point "AggStream") 
and ($sipResp : EventRecord( eventType == "EVENT_UN_AUTHORIZED", name ==
$eventReq.name, id.getCallId()=r1.getId(), respRecv == "false", timeStamp >=
$eventReq.getTimeStamp(), this after[ 0s, 10s ] $eventReq ) from entry-point
"AggStream")
and ($eventReq2 : EventRecord( eventType == "EVENT_REQUEST", name ==
$eventReq.name, respRecv == "false", timeStamp >= $eventReq.getTimeStamp(),
this after[ 0s, 10s ] $eventReq) from entry-point "AggStream")

then
System.out.println( "++ Counter events : unauthorized2 event : "
+ $eventReq.getname()+", $eventReq.getId()="+ $eventReq.getId()+",
$eventReq2.getId()="+ $eventReq2.getId());


This rules give the below output:
++ Counter events : unauthorized2 event : katta $sipReq.getId()=1,
$sipReq2.getId()=1

++ Counter events : unauthorized2 event : katta $sipReq.getId()=2,
$sipReq2.getId()=2

But Expected output is:

++ Counter events : unauthorized2 event : katta $sipReq.getId()=1,
$sipReq2.getId()=2


--
View this message in context: 
http://drools.46999.n3.nabble.com/is-there-any-followed-by-in-Drools-as-we-have-in-esper-tp3901764p3902131.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] is there any 'followed by' in Drools as we have in esper

2012-04-11 Thread skatta1986
Hi,

Please any one let me know if there is any followed by operator in Drools. I
want to correlate an event with another event which follows the first event. 

Esper supports this by using followed by (->) operator. 
Example in esper:
"select  r1.name as name,r1.userIPAddress as ipaddress,count(*) as
usr_success_count, (r2.getTimeStamp()-r1.getTimeStamp()) as delta_time from
pattern" +
"[ (every r1=EventRecord(eventNumber=105, eventType='EVENT_REQUEST'))-> " +
"(r2=EventRecord(eventNumber=110, eventType='EVENT_SUCCES',
id.getCallId()=r1.getId(), name=r1.name)) where
timer:within(usr_timeout_interval sec)]";

Can you please providesimilar kind of rule in Drools.

--
View this message in context: 
http://drools.46999.n3.nabble.com/is-there-any-followed-by-in-Drools-as-we-have-in-esper-tp3901764p3901764.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