This may or may not answer your question, but with regards to #2, I've been
easily able to convert my project based on Facts to Events by simply adding
this to one of the DRL files (I used drools.package):
declare NumericFact // This is an already defined proper Java class
@role( event )
@timestamp( date ) // property defined in class with getter and setter for
my needs (historical data)
@expires( 365d ) // for my needs
end
And in my code to process streamed events:
KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
config.setOption( EventProcessingOption.STREAM );
kbase = KnowledgeBaseFactory.newKnowledgeBase(config);
Note that facts have to be inserted chronologically with STREAM.
HTH (perhaps)
John Peterson wrote:
Message: 4
Date: Fri, 19 Nov 2010 07:01:36 -0700
From: "John Peterson" <john.peterson.gv3k(a)statefarm.com>
Subject: Re: [rules-users] rules-users Digest, Vol 48, Issue 72
To: <rules-users(a)lists.jboss.org>
Message-ID:
<D3A6E68928C9104BB815C83F43A36BDF0ED540DD(a)WPSCV6NH.OPR.STATEFARM.ORG>
Content-Type: text/plain; charset="us-ascii"
>Message: 2
>Date: Fri, 19 Nov 2010 09:07:33 +1100
>From: Xinhua Zhu <xhzhu(a)it.uts.edu.au>
>Subject: [rules-users] Integrate Fusion into Guvnor
>To: rules-users(a)lists.jboss.org
>Message-ID:
> <AANLkTimQfjTTDMj=MFnEr9nqCKtTpdVYFOH-nOT1SFEK(a)mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi
>
>When Fusion can be integrated into Guvnor?
>
>BR
>Xinhua
>-------------- next part -------------- An HTML attachment was
>scrubbed...
>URL:
http://lists.jboss.org/pipermail/rules-users/attachments/20101119/a77038
b9/attachment-0001.html
>
>------------------------------
I asked this question about a month ago and never got a response, but,
through experimentation with it, I did learn some things:
1. There does not appear to be an easy was to define a Fact as an Event.
What I found out, though, is that if you create a technical rule, clear
out the "WHEN-THEN" stuff, you could put the declare in its place and it
seemed to work okay.
2. You can put Accumulates in your rules with Free Form DRL (Guided
Editor) or just use the Technical Rule Editor. I also found that DSL
was easier for it since you could parameterize your sliding windows,
etc., so all you had to do is pop in the values.
3. I don't think your event streams can be built in the Guided Editor
(at least in 5.0.1), so that may force you to do Technical Rules/DRL or
DSL.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users