[rules-users] What is inference and how does it facilitate good rule design and maintenance

Mark Proctor mproctor at codehaus.org
Wed Nov 11 03:02:58 EST 2009


Wolfgang Laun wrote:
> 2009/11/11 Mark Proctor <mproctor at codehaus.org>:
>   
>> Wolfgang Laun wrote:
>>
>> And, perhaps, think about adding (relatively) simple things like
>> permitting, in DRL
>>    import static ...;
>>
>> you can already do this, but we call it import function. We just haven't
>> done the mapping to allow functions to be imported from different
>> namespaces, when they are defined in a drl, instead of on a java class.
>>
>>    final static String foo = ...;
>>
>>
>> This sounds like you want constants defined? I think we need to think more
>> on the whole area of constants, data initialisations and setup etc.
>>
>>     
>
> Exactly. Right now, I can import a class and access its static finals, using
> Class.FIELD. But occasionally it's more convenient (also for maintenance) to
> define them locally.  (Defining a function returning a value is an acceptable
> workaround for simple types and String.)
>
> Initialisation: Yes, for instance, the "global" thing is more like a
> workaround than a
> solution ;-)
>   
We went with "import function" instead of "import static" as we weren't 
sure if anything more than a function would ever be imported, i.e. we 
ignored the idea of static fields. We can re-address that, likewise the 
importantion of functinos and static "constants" from other namespaces.

I was thinking about something event based. So blocks of code can be 
executed at given points in the life cycle of the session. I was 
thinking on session initialisation, on call to fireAllRules and when 
fireAllRules returns back to java code. We are working on making it 
lightweight to listen to events as facts implicitely inserted into the 
engine (but not remembered). That way we could actually just have rules, 
that match given events to do data initialisation or whetever else is 
needed. I'm just not sure what those life cycles should be yet, beyond 
what we already have. When we review data initialisation, we can tackle 
this whole bag of worms.

Mark
> -W
>
>
>   
>> Mark
>>
>> -W
>>
>>
>>
>> Mark
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>     
> _______________________________________________
> 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/20091111/0a23da87/attachment.html 


More information about the rules-users mailing list