<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Wolfgang Laun wrote:
<blockquote
 cite="mid:17de7ee80911102351jf96e0f8x371ca2d03d4355b3@mail.gmail.com"
 type="cite">
  <pre wrap="">2009/11/11 Mark Proctor <a class="moz-txt-link-rfc2396E" href="mailto:mproctor@codehaus.org">&lt;mproctor@codehaus.org&gt;</a>:
  </pre>
  <blockquote type="cite">
    <pre wrap="">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.

    </pre>
  </blockquote>
  <pre wrap=""><!---->
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 ;-)
  </pre>
</blockquote>
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.<br>
<br>
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.<br>
<br>
Mark<br>
<blockquote
 cite="mid:17de7ee80911102351jf96e0f8x371ca2d03d4355b3@mail.gmail.com"
 type="cite">
  <pre wrap="">
-W


  </pre>
  <blockquote type="cite">
    <pre wrap="">Mark

-W



Mark



_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>




_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>


  </pre>
</blockquote>
<br>
</body>
</html>