[rules-users] Firing the rule at the basis of time

Wolfgang Laun wolfgang.laun at gmail.com
Mon May 9 01:37:10 EDT 2011


On a rule's RHS:

    kcontext.getKnowledgeRuntime().getSessionClock()

org.drools.runtime.KnowledgeContext kcontext is automagically available. See
javadoc for KnowledgeRuntime.

-W



On 9 May 2011 06:53, kkelleyjr <karl.kelley.jr at gmail.com> wrote:

> t
> Wolfgang Laun-2 wrote:
> >
> > The session clock is available from the StatefulKnowledgeSession:
> >
> >    SessionClock clock = kSession.getSessionClock();
> >    long ctInMillis = clock.getCurrentTime();
> >
> >
>
> I have seen this in the documentation... However, my issue is: how do I get
> ref to kSession when the session is created through a spring
> configuration... Or are you saying there is always a reference to kSession
> within the rules file? if so, how is the ref to kSession accessed?
>
>  Thanks for your responses,
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-Firing-the-rule-at-the-basis-of-time-tp2889494p2917528.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110509/59c34633/attachment.html 


More information about the rules-users mailing list