[rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread freelance developpement
Hi every one, I defined a function in Guvnor and I want to call it to define a rule template. But I do not know how. Have you any ideas? Thank you in advance ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listin

Re: [rules-users] How to get the Fact datatypes from the Guvnor

2012-02-13 Thread Wolfgang Laun
See inline! On 13 February 2012 06:23, Veera wrote: > Hi All, > > Can anybody help to get the Field type(what datatype it is ). > I have declared a Facts in Guvnor 5.3 and i can able to retreive all the > package names & rules names & fact names , now i want to know what is the > datatype of eac

Re: [rules-users] make the Guvnor interface into French

2012-02-13 Thread freelance developpement
hi Michael Anstis, Can you tell me in detail how to make the interface in French, it is urgent and I have not understood your answer. Thanks in advance. 2012/2/12 Michael Anstis > Translations are always welcome :) > > If you can ensure translations are up to date (there have been many more >

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread Wolfgang Laun
It is not so easy to create rules programmatically (if that's what you mean). You could use the experimental (unstable) "fluent" API (see 2.2.2.6. Rule API in the "Drools Introduction and General User Guide"), but this is a rather inconvenient way of accumulating strings to create a package. I'd r

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread freelance developpement
I have not understood your answer, what I meant was ,for example i had a program function that returns me the max and I want to make it available to one who will create the business rule .It goes like that when access to the creation of a new rule template and not technical (he knows not to program

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread Wolfgang Laun
2012/2/13 freelance developpement > I have not understood your answer, what I meant was ,for example i had a > program function > Do you mean a public static method in some Java Class? You should be able to define an "import function", even in Guvnor. -W "utiliser une fonction dans une rule"

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread freelance developpement
No it's not a method defined in a java class, but it is a function defined in Guvnor using the "Create new function". I want to call this function when I am trying to define a rule template. 2012/2/13 Wolfgang Laun > 2012/2/13 freelance developpement > >> I have not understood your answer, wh

Re: [rules-users] make the Guvnor interface into French

2012-02-13 Thread Michael Anstis
If your browser's locale is fr_FR and you are using the Guvnor WAR from hereyou should already see the French version. If your browser locale is not fr_FR you can still access the French UI by appending ?locale=fr_FR to your URL. Your browser's locale should

Re: [rules-users] make the Guvnor interface into French

2012-02-13 Thread Esteban Aliverti
As Michael said, Guvnor already has French support. All you have to do is to configure your browser to use French or to append "?locale=fr_FR" in Guvnor's URL. @Vincent, if you don't want to do a clone->fork->pull-request you can post the file here.

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread Michael Anstis
Your best bet would be to use a free-form DRL fragment in the Template UI and call the function as you would using DRL. Alternatively, feel free to look at https://issues.jboss.org/browse/GUVNOR-1435 and submit a pull request :) 2012/2/13 freelance developpement > No it's not a method defined i

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread Esteban Aliverti
If you are dealing with non-technical people, maybe you could also use a DSL sentence to "hide" the function call. Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2012/2/13 Michael Anstis >

Re: [rules-users] make the Guvnor interface into French

2012-02-13 Thread freelance developpement
thanks for your response. But how can i know if my browser's locale is fr_FR ? thanks in advance 2012/2/13 Michael Anstis > If your browser's locale is fr_FR and you are using the Guvnor WAR from > here you should already see the > French version. > > If

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread Michael Anstis
DSL's don't support Template keys though... https://issues.jboss.org/browse/GUVNOR-1799 But, if you don't need that, then +1 - DSLs can hide the function call. 2012/2/13 Esteban Aliverti > If you are dealing with non-technical people, maybe you could also use a > DSL sentence to "hide" the func

Re: [rules-users] make the Guvnor interface into French

2012-02-13 Thread Michael Anstis
It should inherit your PCs settings. Check what your locale is set as there. 2012/2/13 freelance developpement > thanks for your response. > But how can i know if my browser's locale is fr_FR ? > > thanks in advance > > > 2012/2/13 Michael Anstis > >> If your browser's locale is fr_FR and you

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread freelance developpement
thanks for your help Michael Anstis can you give me an example of calling a function in fragment drl? the link does not contain enough detail thanks in advance 2012/2/13 Michael Anstis > DSL's don't support Template keys though... > https://issues.jboss.org/browse/GUVNOR-1799 > > But, if you

Re: [rules-users] Call of a function in the definition of a rule template

2012-02-13 Thread Michael Anstis
The Drools Expert user-guide gives details (for calling from the RHS). 2012/2/13 freelance developpement > thanks for your help > > Michael Anstis >can you give me an example of calling a function in fragment drl? >the link does not contain enough detail > > thanks in advance > 2012/2/1

[rules-users] (no subject)

2012-02-13 Thread Alberto R. Galdo
According to the documentation: "Rule constraints do not have direct access to variables defined inside the > process. > It is however possible to refer to the current process instance inside a > rule constraint, > by adding the process instance to the Working Memory and matching for the > process

Re: [rules-users] (no subject)

2012-02-13 Thread Esteban Aliverti
I had some tests working fine in jbpm 5.1 but failing in 5.3 because of this same reason. I'm not sure if this is this is a regression bug or if there is a deliberated change in the behavior. Maybe someone in the jbpm dev team can shed some light here. Best Regards, XX

Re: [rules-users] (no subject)

2012-02-13 Thread Alberto R. Galdo
We're using 5.2.0 final here. What we are also observing is that whenever a process instance reaches a businessruletask node the rule gets fired a number of times equal to the number of instantiated processes even if any of those processes didn't reach the bussinessruletask node. Does this means

Re: [rules-users] (no subject)

2012-02-13 Thread Esteban Aliverti
The behavior you described is how it is working in 5.3 (and it seems 5.2 too). The rule is fired once per process instance you have in your working memory no matter if the others instances are, are not yet or even has already been in that Rule Task Node. Again, I'm not sure if this is a deliberated

Re: [rules-users] Performance scaling with fact insertion

2012-02-13 Thread Wolfgang Laun
There's several things to be noted with the way you've set up these tests. (1) You run all tests (Logical, Manual, Modify) with all three rules being in the KnowledgeBase. This means that all insertions result in the creation of activations for all three rules while firings are restricted using th

Re: [rules-users] Problem deploying 5.3.0 drools server in Tomcat

2012-02-13 Thread kenburcham
Hi guys, I get this same error. I'm deploying 5.3 into a newly downloaded tomcat 6.0.35 running jre 1.6.0_24-b07. I tried removing the offending jar as Esteban suggested but to no avail. I also tried running drools 5.4b2 and with that I don't get the jar error, but instead this is in the

Re: [rules-users] Error running Drools 5.0 HelloWorldExample on WebSphere 6.1

2012-02-13 Thread vinoth
This post has NOT been accepted by the mailing list yet. Hi, I am facing the similar error. Is there any way to solve this issue without changing the dialect. Thanks in advance. -- View this message in context: http://drools.46999.n3.nabble.com/Error-running-Drools-5-0-HelloWorldExample-

Re: [rules-users] Error running Drools 5.0 HelloWorldExample on WebSphere 6.1

2012-02-13 Thread vinoth
Hi,   I am facing the similar error. Is there any way to solve this issue without changing the dialect. Thanks in advance. -- View this message in context: http://drools.46999.n3.nabble.com/Error-running-Drools-5-0-HelloWorldExample-on-WebSphere-6-1-tp61922p3741302.html Sent from the Drools: User

[rules-users] Performance of collect seems to be n-squared

2012-02-13 Thread Shur, Bob
I have a simple class Post { int id; ... }. I insert some number of them as facts and then call ksession.execute(facts); The whole drl file (except for package and import statements) is: rule "collect" when $a : ArrayList(size > 0) from collect(Post()); then System.out.println("N

Re: [rules-users] Performance of collect seems to be n-squared

2012-02-13 Thread Wolfgang Laun
Repeatedly creating this ArrayList is bound to be O(n2). Why do you want the Post facts as a List? There may be better ways for achieving your goal. -W On 13 February 2012 20:49, Shur, Bob wrote: > I have a simple class Post { int id; ... }. I insert some number of them > as facts and then ca

Re: [rules-users] Performance of collect seems to be n-squared

2012-02-13 Thread Edson Tirelli
Just FYI, the array list is created once and reused with incremental addition/removal of elements. The problem is that the engine does not know when you are done inserting all the Post facts, so each post inserted is propagated down the network with the cancellation and reactivation of the r

Re: [rules-users] Fwd: Migrating repository data from Drools 5.0 to 5.3Final

2012-02-13 Thread Michael Anstis
This is fine. 5.2 onwards groups columns for the same pattern together - if you looked at the DRL fo 5.0 you'd have seen the columns are effectively grouped together too. For example; given the following 5.0 configuration (taken from what you describe you have done):- Pattern $a : Column A - Con

[rules-users] MVEL strict-mode vs. performance

2012-02-13 Thread womuji
Hi, We are upgrading from Drools 5.1 to 5.3 to improve the performance, but we are hoping to keep our drl files intact. We were trying to use the old drl files by setting "drools.dialect.mvel.strict=false", but somehow with this setting we still got " unable to resolve method using strict-mode .."

Re: [rules-users] rules-users Digest, Vol 63, Issue 60

2012-02-13 Thread Shur, Bob
; 4, 14, 56, 220, 852 > > > > Is this expected? Is there a better way for me to do the collect? > > > > > > ___ > > rules-users mailing list > > rules-users@lists.jboss.org > > https://lists.jboss.org/mailman/li

[rules-users] Using Character typed properties in Drool 5.3

2012-02-13 Thread Welsh, Armand
Community, In drools 5.2 I had the following LHS" when BloombergColumn (columnName == "CRNCY", $cur : stringValue != null) Country (currency == $cur, emergingMkt == 'Y' || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT")) I a

Re: [rules-users] Using Character typed properties in Drool 5.3

2012-02-13 Thread Welsh, Armand
Correction: Even using Character.valueOf('Y') does not work anymore in Drools 5.3. The validate works, but the compile steps fails because Drools is treating 'Y' as a String. However, in Drools 5.2 and prior, 'Y' was properly casted to a Character when the property it was being compared to wa

Re: [rules-users] Using Character typed properties in Drool 5.3

2012-02-13 Thread Edson Tirelli
Which version of MVEL are you using? It looks like a regression. I will ping Mario to take a look. Edson On Mon, Feb 13, 2012 at 6:45 PM, Welsh, Armand wrote: > Correction: > > Even using Character.valueOf('Y') does not work anymore in Drools 5.3. > The validate works, but the compile ste

Re: [rules-users] rules-users Digest, Vol 63, Issue 60

2012-02-13 Thread Welsh, Armand
ct? > > > > > > ___ > > rules-users mailing list > > rules-users@lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > -- next part -- > An HTML attachment was s

Re: [rules-users] Multiple threading

2012-02-13 Thread Richard Calmbach
Sorry to burst your bubble, but stateful knowledge sessions are most definitely not thread-safe. I have seen hard evidence to this effect in the form of incorrect execution results and log statements that clearly show that two threads were interacting in unexpected ways. In a nutshell: Rule consequ

Re: [rules-users] Using Character typed properties in Drool 5.3

2012-02-13 Thread Welsh, Armand
MVEL2-2.1.0.drools4.jar (packaged with Drools 5.3 final) From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli Sent: Monday, February 13, 2012 5:48 PM To: Rules Users List Subject: Re: [rules-users] Using Character typed properties in Dr

Re: [rules-users] MVEL strict-mode vs. performance

2012-02-13 Thread Mark Proctor
Have a read of the release notes around type safety. There are some situations where Drools was not correctly enforcing type safety, which have since been corrected. So probably a badly written rule is now getting picked up. As a work around you can force some patterns to evaluate dynamically u

Re: [rules-users] Multiple threading

2012-02-13 Thread Mark Proctor
On 14/02/2012 02:01, Richard Calmbach wrote: Sorry to burst your bubble, but stateful knowledge sessions are most definitely not thread-safe. I have seen hard evidence to this effect in the form of incorrect execution results and log statements that clearly show that two threads were interactin

Re: [rules-users] Multiple threading

2012-02-13 Thread Mark Proctor
On 10/02/2012 22:46, apache wrote: Mark the first link in my previous post says something contradictory to what you mentioned. I understand that one thread at a time can use the session just not 2 or more threads at the same time . Is that what you meant too ? I think you are referring to the j

Re: [rules-users] 5.3.0 NoClassDefFound due to nested property access

2012-02-13 Thread Mark Proctor
On 10/02/2012 11:40, Wolfgang Laun wrote: Yes? No? Don't know? None of the previous? What is "bar" is it a String or something else? Where did Monitor come from? Mark On 8 February 2012 11:43, Wolfgang Laun > wrote: Is this already known and fixed in 5.4.

[rules-users] What is the use of Annotation in DeclarativeModel

2012-02-13 Thread Veera
Hi All, anybody give me some idea on annotations which are there in Fact Declarative Model in Guvnor.. If it possible give me one example Thanks in advance.. Regards, Veera -- View this message in context: http://drools.46999.n3.nabble.com/What-is-the-use-of-Annotation-in-DeclarativeMo

Re: [rules-users] 5.3.0 NoClassDefFound due to nested property access

2012-02-13 Thread Wolfgang Laun
Fact( foo.bar == "baz" ) with pojos class Fact { Foo foo; ... } class Foo { String bar; ... } -W On 14/02/2012, Mark Proctor wrote: > On 10/02/2012 11:40, Wolfgang Laun wrote: >> Yes? No? Don't know? None of the previous? > What is "bar" is it a String or something else? Where did Moni