On 18 December 2012 17:32, riri <[email protected]> wrote: > Hy, > > Thank you very much for your response, I will definitely think about using > declared types for user input. The proposed UserParameter can be a Java class as well.
> I'm not exactly sure I understood how the > attributes of UserParameter are set from outside the rule file in the code > you posted. I thought you want to let rule authors to set these values? If not, use a POJO and and create and insert this fact. > > I found that in the documentation in section 5.7.6. "Accessing Declared > Types from the Application Code" it is stated that these types are generated > at knowledge base compilation time. Would it be necessary to create a new > knowledge session each time these values are modified or can a previously > created session be used? If the parameters are in a fact, simply modify them, but make sure that the session is "idle" at this moment. A change of any fact may retrigger rule activations of the changed fact in combination with others. > > Lastly, I assume that the timer still has to be created with constant values > and there is no way around that. Note that a timer simply fires repeatedly, at defined times. This is not really helpful in determining whether a fact arrives within a certain interval unless you accept that this canbe delayed until the end of the interval. -W > > I will be testing the declared type functionality myself to see how it works > but any response I get is greatly appreciated. > > Thank you for your time! > Regards > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-Rules-with-variable-timers-tp3262197p4021239.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
