Re: [rules-users] Get previous fact from working memory.
Thanks Vincent, but when I do it like this: It's sufficient that EVENT2 has happened anywhere before EVENT1. So EVENT1, EVENT2 => false, false EVENT2, EVENT1 => false, true (that's right, but:) EVENT2, EVENT1, EVENT1 => false, true, true (?) How do I fix that? -- View this message in context: http://drools.46999.n3.nabble.com/Get-previous-fact-from-working-memory-tp3399064p3400371.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] Get previous fact from working memory.
Thank you very much. I'll try that. But there's another small problem I've just faced. I'm trying to insert a new Event object into the working memory. I can do that with but results in What am I doing wrong? -- View this message in context: http://drools.46999.n3.nabble.com/Get-previous-fact-from-working-memory-tp3399064p3399156.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] Get previous fact from working memory.
So, if I get you right, I have to, for example, store some kind of time stamp in my event object and compare it? My definition of "previous" simply depended on the order, the objects were inserted into the working memory. -- View this message in context: http://drools.46999.n3.nabble.com/Get-previous-fact-from-working-memory-tp3399064p3399079.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] Get previous fact from working memory.
Hello everyone, I think my problem is quite simple, but still, I can't come up with a solution. What I want to do is compare the last fact with the current one and I'm wondering how to do that. That's how I check if the EventType of the current Event is EVENT1. What I want to do now is check if the EventType of the current Event is EVENT1 and EventType of the previous Event is EVENT2. How can I do that? Thanks very much in advance, Martin -- View this message in context: http://drools.46999.n3.nabble.com/Get-previous-fact-from-working-memory-tp3399064p3399064.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