Hi Michael,

Thanks for taking time answering my message. Now I realize it was not very clear.
"Person" was never provided as an option, but I would love it did so :-). If you had time, let me explain in a few words.

For the moment, Drools completion engine provides quite the same functionality for the rule language an IDE provides for the Java language. Don't get me wrong, as a Java developper I think it is really fantastic! And, as a Java developer, I know that know the code completion engine cannot suggest anything about the value of a String ("/Person/Jim").

What I wanted to say is: as Drools is not only targetted to Java developers, "business users" might expect (and they actually do) something more. They know that rules will apply on their data. Data exists and "business users" know their data (they know about that "/Person/Jim" does exist). However, as they don't know anything about the impossibility in Java to suggest the content of a String (they are not Java developers), they don't understand why the completion engine can't keep on suggesting "/Person/Jim". Somehow they have Google search in mind, that starts suggesting words as soon as you type your query. Here in Drools it could be even more accurate since the suggestion engine knows that the "/Person/name" String is wanted for the "name" field of the "Annotation" class. So maybe it could offer a suggestion hook method, even for Strings. As a Java developer, I could implement it for my business users. This would prevent business users from having to write Java-developer-oriented solutions you proposed (and I thank you for your proposals by the way :-)).

I say I have the impression to be "in the middle" because I could have a Person class (and I probably should), but I can't have a class for every first name (Jim)

I know this is completely out of the scope of a rule engine, however it would fit Drools editor so well that I wanted to say it.

Anyway, sorry for bothering you with my "delirium" ;-).

Best regards,

Bruno.


Le 16/09/2011 17:53, Michael Anstis a écrit :
You could externalise the paths for the annotations:-

MyConfigurationSettings( $jimPath : pathToJimAnnotations )
jim : Annotation( name = $jimPath )

(where MyConfigurationSettings is a fact inserted into WM).

or

MyConfigurationSettings( $jimPath : pathToJimAnnotations ) from $globalServiceObject.getMeMySettings( )
jim : Annotation( name = $jimPath )

(where MyConfigurationSettings is available from a - perhaps - Hibernate query).

I am surprised "Person" was provided as an option (without knowing the auto-complete code in any detail). Perhaps it is a class on your classpath?

With kind regards,

Mike

On 16 September 2011 16:37, Bruno Freudensprung <bruno.freudensprung@temis.com> wrote:
Hi,

I have a remark, maybe its just out of scope... however as it is in the
perspective of enabling end users to deal with their business domain,
leaving appart the technical aspects (which is one of strong points of
Drools), here it is.

Drools is great because it enables to express things simply. For
instance, in my company, we are annotating text. So our rules look like:
when
    jim: Annotation (name = "/Person/Jim")
    boston: Annotation (name = "/City/Boston")
    ...
However, in the end, it turns out that what is inside Strings is part as
well of our business domain. Maybe it is probably stored into a database
or whatever.

So, in my dreams (and, surprisingly, so said the customer I saw
yesterday and that didn't know anything about Drools!!), when I
Ctrl-space at the beginning of the String (after "/P), the rule
authoring environment suggests "/Person", juste because it knows,
somehow, that annotations can be one of those (maybe in absolute, or in
that particular context).

Would you say that I completely lost my mind? :-) Or more prosaically
that there is a design flaw in my data model?
Personnally I have the impression to be somewhere in the middle...

Best regards,

Bruno.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users