Re: [rules-users] Functions not generated from decision tables with Drools 5.2

2011-11-11 Thread Michael Anstis
Something must be wrong. Providing your spreadsheet would be helpful. On 11 November 2011 10:11, hdrews heinz.dr...@gmail.com wrote: I have a decision table with functions but they are not contained in the generated DRL. What have I to do to fix this? -- Heinz -- View this message in

Re: [rules-users] Functions not generated from decision tables with Drools 5.2

2011-11-11 Thread Heinz Drews
I have reduced the original XLS, but the problem still exists. 2011/11/11 Michael Anstis michael.ans...@gmail.com: Something must be wrong. Providing your spreadsheet would be helpful. On 11 November 2011 10:11, hdrews heinz.dr...@gmail.com wrote: I have a decision table with functions

Re: [rules-users] Functions not generated from decision tables with Drools 5.2

2011-11-11 Thread Michael Anstis
You have a space after the keyword Functions . Removing this solves the problem. 2011/11/11 Heinz Drews heinz.dr...@gmail.com I have reduced the original XLS, but the problem still exists. 2011/11/11 Michael Anstis michael.ans...@gmail.com: Something must be wrong. Providing your

Re: [rules-users] Functions not generated from decision tables with Drools 5.2

2011-11-11 Thread Heinz Drews
Many thanks. I will check the SpreadsheetCompiler to add a trim before checking. Should I open a jira? 2011/11/11 Michael Anstis michael.ans...@gmail.com: You have a space after the keyword Functions . Removing this solves the problem. 2011/11/11 Heinz Drews heinz.dr...@gmail.com I have

Re: [rules-users] Functions not generated from decision tables with Drools 5.2

2011-11-11 Thread Michael Anstis
It would be best to create a JIRA to record and track the issue. Are you planning on providing a git pull request for the fix? On 11 November 2011 13:12, Heinz Drews heinz.dr...@gmail.com wrote: Many thanks. I will check the SpreadsheetCompiler to add a trim before checking. Should I open

Re: [rules-users] Functions not generated from decision tables with Drools 5.2

2011-11-11 Thread Michael Anstis
BTW, if you need a hand setting up your environment just ask. It should be quite straight forward and there is a helpful README.md file that explains the necessary steps. On 11 November 2011 17:10, Michael Anstis michael.ans...@gmail.com wrote: Hi Heinz, I've stayed purposefully quiet on the

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-17 Thread ru
Maybe this should be reported as a new bug to Drools team? -- View this message in context: http://drools.46999.n3.nabble.com/Functions-with-array-parameters-double-cease-to-compile-in-5-2-0-tp3251260p3260980.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-17 Thread Wolfgang Laun
I don't think it is new - it's a form of what I reported in JBRULES-3117https://issues.jboss.org/browse/JBRULES-3117 -W On 17 August 2011 10:32, ru soro...@oogis.ru wrote: Maybe this should be reported as a new bug to Drools team? -- View this message in context:

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-17 Thread ru
Thank you very much for the help. Sincerely, Ru -- View this message in context: http://drools.46999.n3.nabble.com/Functions-with-array-parameters-double-cease-to-compile-in-5-2-0-tp3251260p3261553.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-16 Thread ru
Situation definitely treaky - I am working as author on DroolsTab plugin to Protege (http://protegewiki.stanford.edu/wiki/DroolsTab). In this project drl file is generated programmatically and sent through pipe to PackageBuilder. I did some experiments as you suggested. Results: 1. Only one

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-16 Thread Wolfgang Laun
Indeed. It seems that, from 5.2.0 on, when there is a DRL file containing a function with a signature that contains a parameter that is an array of some simple type foo (int, double,...) and a scalar parameter of the same type and another function with a similar signature, an inappropriate syntax

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-16 Thread Wolfgang Laun
I just found that this is apparently a variant of JBRULES-3117https://issues.jboss.org/browse/JBRULES-3117 -W On 16 August 2011 20:49, Wolfgang Laun wolfgang.l...@gmail.com wrote: Indeed. It seems that, from 5.2.0 on, when there is a DRL file containing a function with a signature that

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-15 Thread ru
function ArrayList nextPoint( int N, int t1, int sec, double[] a, double v ) { int Nxt = N+1; int Nxt2 = Nxt * 2; if(Nxt2 = a.length-1) return null; int N2 = N * 2; double p1 = a[N2]; double l1 = a[N2+1]; double p2 = a[Nxt2]; double l2 = a[Nxt2+1]; double D = GreatCircle.sphericalDistance(p1,

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-15 Thread ru
Alas, I have the same problem with this code: function ArrayList nextPoint( int N, int t1, int sec, double[] a, double v ) { int Nxt = N+1; int Nxt2 = Nxt * 2; if(Nxt2 = a.length-1) return null; int N2 = N * 2; double p1 = a[N2]; double l1 = a[N2+1]; double p2 = a[Nxt2]; double l2 =

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-15 Thread Wolfgang Laun
I thought you might have - it's bound to be some freaky situation you must have run into. I suggest that you experiment a little. Does this error happen when you have nothing but a function with this signature on a .drl file? Does it also occur with some other simple type, or with a class? Do

Re: [rules-users] Functions with array parameters (double[]) cease to compile in 5.2.0

2011-08-13 Thread Wolfgang Laun
How about giving a complete example? -W On 13 August 2011 12:11, ru soro...@oogis.ru wrote: Hello drools users and team, My functions with array parameters (double[]) cease to compile in 5.2.0. Error message is: In package ActionExecutor error: [ prevPoint : unable to resolve type while

Re: [rules-users] functions inside fact type declaration?

2010-08-09 Thread Edson Tirelli
I thought about adding that, but I feel like we would just be reimplementing java, in this case. So, if you need anything else other than simple java beans, you should implement it as a java class. Regarding the constructor, I might still add a constructor that receives all fields as

Re: [rules-users] functions inside fact type declaration?

2010-08-09 Thread Greg Barton
+1 on the full constructor. GreG On Aug 9, 2010, at 3:58 PM, Edson Tirelli tire...@post.com wrote: I thought about adding that, but I feel like we would just be reimplementing java, in this case. So, if you need anything else other than simple java beans, you should implement it as a java

Re: [rules-users] functions inside fact type declaration?

2010-08-09 Thread Edson Tirelli
Hehe, ok, you convinced me Greg! ;) https://jira.jboss.org/browse/JBRULES-2652 Edson 2010/8/9 Greg Barton greg_bar...@yahoo.com +1 on the full constructor. GreG On Aug 9, 2010, at 3:58 PM, Edson Tirelli tire...@post.com wrote: I thought about adding that, but I feel like we

Re: [rules-users] functions

2009-06-18 Thread Edson Tirelli
Chris, If you are creating a function library, why don't you create it as static methods in a java class? easier to develop, to unit test and you can use import function in the DRL to import all of them. []s Edson 2009/6/18 Chris Richmond crichm...@referentia.com Ok…I am trying

RE: [rules-users] functions

2009-06-18 Thread Chris Richmond
...@lists.jboss.org] On Behalf Of Edson Tirelli Sent: Thursday, June 18, 2009 1:15 PM To: Rules Users List Subject: Re: [rules-users] functions Chris, If you are creating a function library, why don't you create it as static methods in a java class? easier to develop, to unit test and you can

Re: [rules-users] functions

2009-06-18 Thread Andrew Waterman
:* Thursday, June 18, 2009 1:15 PM *To:* Rules Users List *Subject:* Re: [rules-users] functions Chris, If you are creating a function library, why don't you create it as static methods in a java class? easier to develop, to unit test and you can use import function in the DRL to import all

Re: [rules-users] functions

2009-06-18 Thread Edson Tirelli
:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *Edson Tirelli *Sent:* Thursday, June 18, 2009 1:15 PM *To:* Rules Users List *Subject:* Re: [rules-users] functions Chris, If you are creating a function library, why don't you create

Re: [rules-users] functions

2009-06-18 Thread Edson Tirelli
Of *Edson Tirelli *Sent:* Thursday, June 18, 2009 2:25 PM *To:* Rules Users List *Subject:* Re: [rules-users] functions Chris, I understand. Although functions in DRL files where conceived to be very simple things to reside with the rules. So, although you can have a DRL file

Re: [rules-users] functions over the rule template of a Condition in a Decision Table

2008-09-21 Thread Edson Tirelli
Place it inside an eval(). Use the regular $ syntax for paramenters. []s Edson 2008/9/19 javier [EMAIL PROTECTED] Hello, It is posible to write a function over the rule template of a CONDITION in a Decision Table? I mean instead of write the rule template:

Re: [rules-users] Functions in Dynamic Salience?

2008-01-14 Thread Mark Proctor
James Carman wrote: Can I use a function to calculate my dynamic salience (http://blog.athico.com/2007/05/dynamic-salience-expressions.html)? you should be able to, give it a try and log a JIRA if it can't.