Pretty sure I am correct, think the devs are at a conference this week in
London.
http://blog.athico.com/
1)Start time , point time interval.
2)Don't know exactly, I think the documentation is just showing what is
meant.
But it does say you need to set at least the start time and duration.
If you don't set the time stamp , it gets a timestamp of the time it was
inserting into working memory and duration 0.
3)timestamp is the same as start time. if no duration is set
In our rule set , I set a timestamp attribute, duration and also a
endtimestamp.
You can also do items like this , but reading the docs I am double checking
timeEndMs after[-120s,120s] AND0.timeMs ,
More is in the
http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-fusion-docs/html/...
I think the start and endtime time stamp statements in the documentation is
for clarity.
When working with the rules we have , reading the documentation let me know
if the temporal operators is what I needed.
On Mar 8, 2012 11:55 AM, "mind" <gil.vegliach(a)gmail.com> wrote:
Hello everybody,
I recently started using Drools (with C#) and I have some problems in
understanding how temporal operators work with the duration field.
According
to the documentation, the temporal operators work with startTimestamp and
endTimestamp of events, the semantics being defined with inequalities. In
order to work, temporal operator requires the duration field to be
declared.
Now the questions:
1. What does @timeStamp stay for? The start or the end timestamp?
2. Does Drools calculate startTimestamp and endTimestamp if I set
@timeStamp
and @duration attribute from my C# code? If not how can I set them? (like
shall I declare like @startTimeStamp(sth) and set from the C# code?)
3. Do temporal operators work if I do not set explicitly the start and end
timestamps but just @timeStamp and @duration attributes?
In particular, I have this drl file (%VAR% are replaced by other code):
declare IntensionalEvent
@role(event)
@timeStamp(timeStamp)
@duration(duration)
end
rule "Expression (%EVENTNAME1%, %OPERATOR%, %EVENTNAME2%, %TIMESPAN%,
%TIMEVAR%)"
dialect "mvel"
when
$eventA : IntensionalEvent( name == '%EVENTNAME2%' )
$eventB : IntensionalEvent( this %OPERATOR% $eventA,
name == '%EVENTNAME1%'
) over window:time( %TIMESPAN% )
then
blah blah... create an IntensionalEvent and set timestamp
and duration
end
Thanks everybody,
Gil
--
View this message in context:
http://drools.46999.n3.nabble.com/Duration-attritube-and-Temporal-Operato...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users