[rules-users] 2 problems with the keyword contains in HashMaps

2012-10-11 Thread raffi
Hy. I have problems, filtering data with the help of /contains/. I have a HashMap with /long/-values as keys. In my rules I filter data in the following way: FilterCriteria(categories_slot1 contains $cid) HashMap categories_slot1 is initialized with HashMapLong, Double. $cid is set as long value

Re: [rules-users] 2 problems with the keyword contains in HashMaps

2012-10-11 Thread Wolfgang Laun
The contains operator is mapped to the method Collection.contains(). 1st question: Map isn't extending this interface, and HashMap does not implement it. But it's possible to write categories_slot1.keySet() contains $cid 2nd question: Evident from the initial statement. -W On 11/10/2012,

Re: [rules-users] Protobuf Marshaller Question (ScheduledActivation Persistence)

2012-10-11 Thread Mario Fusco
Philipp, I gave a look at this issue and then I rejected the ticket. I am copying below the comment I left on it for convenience. As you can read KnowledgeBaseFactory has to be configured to use the TrackableTimeJobFactoryManager in order to correctly marshall the Scheduled Activations. This

Re: [rules-users] 2 problems with the keyword contains in HashMaps

2012-10-11 Thread raffi
For second problem I think it should work with the /matches/-operator. I will test it... First problem: I tested it with identical strings in HashMap and transaction data and it worked, so I thought only strings are allowed. I tried it with strings as key values and casting $cid to string in the

[rules-users] Iterating facts

2012-10-11 Thread Phani Saripalli
Hi. 1) I could list all the facts via knowledge session.facthandle.iterator. 2) I could iterate over the objects contained in a fact. For example: ListFactField fFields = ksession.getKnowledgeBase().getFactType(pckg, Project).getFields(); 3) I could get the name of the object and

Re: [rules-users] Unable to find implementation for BusinessRuleProvider

2012-10-11 Thread vargheseps
Hai I was also facing the same issue and your replay was helpful and i have added droolsjbpm-ide-common-5.2.0.M2.jar to the class path of my project as you suggested .But i am getting the following exception. java.lang.IllegalStateException:

Re: [rules-users] 2 problems with the keyword contains in HashMaps

2012-10-11 Thread Wolfgang Laun
On 11/10/2012, raffi christian.koeh...@s2008.tu-chemnitz.de wrote: For second problem I think it should work with the /matches/-operator. I will test it... I wasn't sure what your formulations mean, i.e., when the test should return true, but you have all the information to answer it for

[rules-users] firing rules twice in single session on single object

2012-10-11 Thread Sai Nadh
hi , I am able to fire the rules in drools...But i want to fire the rules after modification of same data ie.., i want to fire the rules twice in the same session for example: i have some stock of different items, if the particular stock item quantity is less than minimum quantity i want fire

Re: [rules-users] java.lang.OutOfMemoryError: Java heap space

2012-10-11 Thread Wolfgang Laun
On 11/10/2012, mohan mohan.narang...@gmail.com wrote: Hi laune, Assume we continuously getting vast number of facts or events from a stream and we want to reasoning over particular time window (accumulate number of events on this window) how we could achieve the same? Guess we cannot call

Re: [rules-users] firing rules twice in single session on single object

2012-10-11 Thread abhinay_agarwal
hi sai, AFAIK whenever you change/modify anything inside a FACT, the rule using the FACT will get refired again. Regards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-firing-rules-twice-in-single-session-on-single-object-tp4020220p4020222.html Sent

Re: [rules-users] firing rules twice in single session on single object

2012-10-11 Thread Sai Nadh
thank for your response sir i have tried so many times but it is not firing more than one time could you please help me with some sample code so that i can modify my requirement On Thu, Oct 11, 2012 at 4:58 PM, abhinay_agarwal abhinay_agar...@infosys.com wrote: hi sai, AFAIK whenever you

Re: [rules-users] firing rules twice in single session on single object

2012-10-11 Thread abhinay_agarwal
If you want the same rule to fire again and again then just modify the fact such that the WHEN condition is satisfied. For example in the HELLO WORLD sample Code : rule Hello World no-loop when m : Message( status == Message.HELLO, myMessage : message ) then

Re: [rules-users] java.lang.OutOfMemoryError: Java heap space

2012-10-11 Thread mohan
Hi laune, Yes i already used @expires(24h) metadata for event. So each event will expire after 24 hours. But per day we are getting over 1000k events and inserting it into working memory will cause to java.lang.OutOfMemoryError. Guess increase Java heap size not best solution either. How we can

[rules-users] Listening to changes on facts

2012-10-11 Thread jspartan0901
Hello, I am currently evaluating fusion for our project. We are planning to deploy it on an application server. When a rule is successfully executed. I need to generate an action such as sending a message to a queue. As per my understanding so far, when a rule matches conditions, we need to

Re: [rules-users] java.lang.OutOfMemoryError: Java heap space

2012-10-11 Thread mohan
Hi laune, I'll explain the process briefly. I’m getting voice call events from our billing system. We want give some offers if call made inside specific cell (uploaded this fact to WM in advance) . But we have to give offer only once per day. So repeated calls inside this cell won’t eligible for