is all the work is in the RHS in the loops, probably maybe better in code.

However, if you use the engine to match up the slots (each slot being a little fact seperately asserted) then it may work out nicely (just a guess).

On 11/13/06, Paul Smith <[EMAIL PROTECTED]> wrote:
Hi Guys,

Can anyone tell me if it would be a valid use of a rules engine to perform a calculation that populated attributes of the asserted object based on another contained object. The situation is as follows:

I have an object which has a timing model. The timing model has a factor which basically corresponds to the number of slots in a 24 hour period eg) 720 X 5 min slots. I want to be able to assert an object eg) 'foo' which contains the timing model and an empty list of time slot objects and have the rule populate the list of time slots. The list of time slots is also dependent on the start and end date that is supplied, so that the time slot is created with the correct start and end data/time. It effectively requires a loop to create the time slot objects. Is this getting into the realms of writing Java code to do this or is this a reasonable use of a rules engine? If it is a reasonable use, how would you construct it. It's fairly easy to construct this in code but would probably be quite neat in a rule/set of rules.

Any suggestions would be greatly appreciated.

Reply via email to