Re: [rules-users] How to make available declarative model to all packages.

2012-07-24 Thread Michael Anstis
OK, great I understand :)

What version of Guvnor are you using?

On 25 July 2012 07:18, rodolphio  wrote:

> Hi manstis,
>
> I allready have made the 2 steps you mentioned above. This is not the
> problem.
>
> The problem is the following step 3:
> Going to the "Edit" tab in the package "x.y.z" and adding the types from
> the
> imported declarative model  in the list named "Configuration: Imported
> types", because if I click on the green + there is no type from the
> declarative model to choose.
>
> And my rule in the package "x.y.z" needs the missing type. So the package
> cannot be build.
>
> I hope I have expressed my problem now clear enough.
>
> Thanks in advance.
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018889.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> 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


Re: [rules-users] Continuous Planning values for task planning

2012-07-24 Thread Geoffrey De Smet


Op 24-07-12 23:14, Josef Bajada schreef:

Hi Geoffrey,

Thanks for your reply.

> Does it make sense to wait longer than 7 mins after task A 
(presuming no other task forces occupies the user at that time)?
> Put differently: Can we say that the starting time of B = 
Math.max((endTime of task before B), (endTime of task A + 7 minutes))?
> If we can say that, it's pointless to investigate the solutions 
where task B starts 8 minutes after task A and the user doing no task 
that last minute.


Yes, the starting time of B = Math.max((endTime of task before B), 
(endTime of task A + 7mins)) as long as it is smaller than (endTime of 
task A + 8mins).
Yes, it is pointless to investigate the solutions where task B starts 
8 minutes after task A and the user doing no task that last minute.
The 8 minute is just a constraint that the task in between tasks A and 
B cannot take longer than 7:59s.


I am thinking that maybe instead of using time itself as the planning 
variable, we would use time just to determine the Hard and Soft scores.
So if Task B is scheduled after Task A + 8mins by the solver, then it 
inflicts on the hard score. Similarly if Task B is scheduled before 
Task A + 7 mins.

Does my reasoning make sense in any way?
Yes, but personally, I 'd design it differently (although I have no 
proof that my way would be better), like this:
"Task B is scheduled after Task A + 8mins by the solver" => make this a 
hard constraint
"Task B is scheduled before Task A + 7 mins" => make this a build-in 
hard constraint (= not a constraint in the scoreDRL or ScoreCalculator, 
but by design, see manual).
Each Task is assigned to a previousTaskOrPerson (and this variable is 
chained). It does not know it's startingTime directly.
The scoreDRL or ScoreCalculator calculates the startingTime of a Task 
dynamically, by applying this logic:
  starting time of B = Math.max((endTime of previousTaskOrPerson of B), 
(endTime of task A + 7mins))
Note: "Chained=true" guarantees that there are no cycles of Tasks and 
that no Tasks exists with a previousTaskOrPerson == null.
Note: "(endTime of task A + 7mins)" is not hard coded in the score 
function: you won't find "7" or "A" in there.




thanks,
Josef



On 24 July 2012 20:46, Geoffrey De Smet > wrote:



Op 23-07-12 16 :26, Josef Bajada schreef:

Hi Geoffrey,

Well I want to leave 'space' between tasks in the situations
where there are hard constraints that require me to put this space.

This makes the chaining technique harder to model, but I wouldn't
write it off yet.



As a simple example:

Task A: Put pasta in boiling water (duration 40 seconds)
Task B: Take pasta out of boiling water (duration 50 seconds,
cannot start before 7 mins after Task A finishes, cannot start
after 8 mins after Task A finishes)

Does it make sense to wait longer than 7 mins after task A
(presuming no other task forces occupies the user at that time)?
Put differently: Can we say that the starting time of B =
Math.max((endTime of task before B), (endTime of task A + 7 minutes))?
If we can say that, it's pointless to investigate the solutions
where task B starts 8 minutes after task A and the user doing no
task that last minute.
If we can say that, then chaining can calculate the the starting
time of a task on the fly differently.


Task C: Chop vegetables (duration 2 minutes).

This will evidently leave some gaps. The ideal result from the
solver should be:

Task A: at time 0 (ends at 40s)
Task C: at time 41s (ends at 2:41)
Task B: at time 7:40

There is a gap between C and B which is OK.

If another Task is added to the story:
Task D: Prepare sauce (duration 7 minutes)

I would want the following result:

Task A: at time 0 (ends at 40s)
Task D: at time 41s (ends 7:41s)
Task B: at time 8:42s (ends 9:32s)
Task C: at time 9:33s (ends 11:33s)

Task C can actually take place before Task A too.

I still need to read and understand the chaining functionality
properly. Do you think it would allow me to achieve the above?


I don't know.
But using continuous variables in a search problem such as this
that smells discrete with discrete constraints (A must start
before B, ...), could blow up the search space unnecessarily.

If you want to look into using continuous variables: the support
for it is limited currently.
you can reuse the Drools Planner metaheuristic algorithms
(including termination, score, ...), but there's no decent generic
move factory support for continuous variables yet.
So you 'll have to write a custom MoveFactory that creates a
limited subset of moves.
Also, construction heuristics can't handle continuous variables
yet, so you 'll have to write a custom SolutionIntializer.
There are examples with a custom MoveFactory and a custom
SolutionIntializer where

Re: [rules-users] How to make available declarative model to all packages.

2012-07-24 Thread rodolphio
Hi manstis,

I allready have made the 2 steps you mentioned above. This is not the
problem.

The problem is the following step 3:
Going to the "Edit" tab in the package "x.y.z" and adding the types from the
imported declarative model  in the list named "Configuration: Imported
types", because if I click on the green + there is no type from the
declarative model to choose.

And my rule in the package "x.y.z" needs the missing type. So the package
cannot be build.

I hope I have expressed my problem now clear enough.

Thanks in advance.





--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018889.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Moving comment in DSLR file causes issue under 5.3

2012-07-24 Thread Wolfgang Laun
I'm not sure what exactly causes your errors - is it exactly what you
have posted, or anything different from what you have written, with
that line moved elsewhere or anywhere?

What does the resulting DRL look like?

A semicolon at the end of the statement is indicated unless it's commented out.

-W



On 24/07/2012, drdaveg  wrote:
> This is an odd one.  I was testing some DSL and have been tracing back an
> error in the translation.  The line marked in the code below, even as a
> comment, causes multiple "cannot be resolved" errors when moved.  Any
> thoughts on what could cause this other than a bug?
>
> Note that almsot all of the code is commented and as it appears now
> generates the errors.  If I move the line to the LHS the "cannot be
> resolved" errors go away.  The only interesting thing shown in the DRL
> viewer is that some of the comments appear duplicated.
>
> rule "Compute"
> when
> # Fare(fareBasisCode  == fp1)
> #  ts1 : TrainSegment(fl1 : fareList)
> #  ts2 : TrainSegment(fl2 : fareList)
> #  mySol : Solution()
>>  Fare(fp1 : fareBasisCode, thruFare == true)
>>   x : FQ3()
> # eval(fl1.get(fp1 )!=null)
> # eval(fl2.get(fp1)!=null)
> # eval(mySol .nthSegment(ts1)==(mySol .nthSegment(ts2)+1))
> then
> # > //int n = fq.nthSegment(fp1)   ** moving this line can cause a
> syntax error
> # > FQ3 test = new FQ3(); test = fq;
>>   System.out.println(fp1);
>>  x.setPassengerString("T");  // x.getPassengerString()+
> end
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Moving-comment-in-DSLR-file-causes-issue-under-5-3-tp4018882.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> 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


[rules-users] fire a rule only once (for the time being)

2012-07-24 Thread slyfox
It seems like there are many similar problems but I have not been able to
find anything that addresses my issue exactly.  

I have a stock trading application, and I want to check if the price is out
of a range (high,low)

if the price goes below low, the problem is the rule keeps firing if the
price keeps going lower, this creates too much noise and overhead.  

I thought maybe the no-loop and duration attributes would help but they
didnt.  

I know I could check not(Fired()) and use insert fired but I believe that
spans the entire session which I do not want either.  

Is there a way to say fire this rule if true once then wait a period of time
before I check again.

>From what Ive read maybe agenda filters, but I am not sure if that is
flexible enough.





--
View this message in context: 
http://drools.46999.n3.nabble.com/fire-a-rule-only-once-for-the-time-being-tp4018887.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Guvnor 5.2 Issue on Websphere AS 7

2012-07-24 Thread Ravikiran
Hi,

Drools Guvnor 5.4.0 Final  - I came to know that this version may not work
successfully in Websphere because IBM Websphere uses OpenWebBeans as CDI
implementation. Where as JBoss uses weld and this seems to differ. Not very
sure about the implementation of two sides...is it?

Drools Guvnor 5.2.0 Final - This is deployed successfully deployed on
Websphere, and i got the blank page after the sample repository is created
during launching.

@Guvnor experts, do you suggest any other version of drools guvnor
distribution without weld that can resolve my above issues?

Thanks



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Guvnor-5-2-Issue-on-Websphere-AS-7-tp4018829p4018886.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Change Scanner does not start

2012-07-24 Thread Antonio Anderson Souza
Thanks Vinodkiran,

Your answer(
http://drools.46999.n3.nabble.com/rules-users-Change-Scanner-does-not-start-td4018607.html)
fixed
the Change Scanner problem, just put the enabled="true" and the Change
Scanner started working.

For some reason your answer was not accepted in the mailing list, so i
discovered that somebody had answer my post only today googling about the
problem again.

Thank you very much!

Antonio Anderson Souza

 


Blog  - Twitter -
LinkedIn  -
Facebook



On Thu, Jul 12, 2012 at 4:14 PM, Antonio Anderson Souza <
antonio...@gmail.com> wrote:

> Dear All,
>
> I discovered why the rules stopped working after ChangeScanner starts the
> problem is the issue 
> JBRULES-2947
> .
>
> To fix the problem I changed my models to a POJO package instead of the
> Described in the Guvnor (the solution was found in this thread
> http://drools.46999.n3.nabble.com/drools-server-resource-change-scanner-notifier-td2649325.html),
> after that when I start the Change Scanner by the jsp DroolsServer detects
> changes in the rules stored in Guvnor, and fire all rules properly.
>
> The unique problem that persists is the Change Scanner start that i need
> to call it in the JSP mannually, I'll automate in the the application start.
>
> Best Regards,
>
> Antonio Anderson Souza
>
>  
> 
>
> Blog  - Twitter -
> LinkedIn  - 
> Facebook
>
>
>
> On Wed, Jul 11, 2012 at 7:53 PM, Antonio Anderson Souza <
> antonio...@gmail.com> wrote:
>
>> Dear All,
>>
>> I have an application that use Guvnor 5.4.0 final as the rules repository
>> and a DroolsServer 5.4.0 final (with Spring Camel) to provide rule engine
>> via a Rest Webservices, all of those apps Running in a JBossAS 7.1.
>>
>> All of the service are working perfectly, except the
>> resource-change-scanner that is configured in the knowledge-services.xml
>> [1] as it's described in the documentation.
>>
>> When Drools-Server are deployed the Change Scanner does not start (I'm
>> monitoring the change scanner via Wireshark analyzing the communication
>> between DroolServer and Guvnor), I've created an small JSP file [2] that
>> invoke the ChangeScanner start method, when i run the JSP the Change
>> Scanner start to work (i can see the http requests from Drools Server do
>> Guvnor to see if the knowledge base had changed), but after Change Scanner
>> started working the rules are not triggered anymore.
>>
>> So without Change Scanner I've all of the knowledge service running
>> properly, but the App is unable to detect rules changes, when I explicitly
>> (via JSP) start the Change Scanner all of the knowledge service stopped
>> working.
>>
>> Change Scanner starts automatically?
>>
>> Does anybody has some idea to help me?
>>
>> [1]
>> 
>> http://www.springframework.org/schema/beans";
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>xmlns:drools="http://drools.org/schema/drools-spring";
>>xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>http://drools.org/schema/drools-spring
>> http://drools.org/schema/drools-spring-1.3.0.xsd";>
>>   
>>   
>>   
>>   
>> 
>>   
>> 
>>   
>>   > node="node1"/>
>> 
>>
>> [2]
>> 
>> <%@ page language="java" contentType="text/html; charset=utf-8" %>
>> <%
>> org.drools.io.ResourceChangeScannerConfiguration sconf =
>> org.drools.io.ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
>> sconf.setProperty("drools.resource.scanner.interval", "5");
>>
>> org.drools.io.ResourceFactory.getResourceChangeScannerService().configure(sconf);
>> org.drools.io.ResourceFactory.getResourceChangeScannerService().start();
>> org.drools.io.ResourceFactory.getResourceChangeNotifierService().start();
>> %>
>>
>> Best Regards,
>>
>> Antonio Anderson Souza
>>
>>  
>> 
>>
>> Blog  - Twitter-
>> LinkedIn  - 
>> Facebook
>>
>>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Compiled rules differ KnowledgeAgent vs ResourceChangeScanner

2012-07-24 Thread lhorton
I have found a solution for this problem, but I don't know why the solution
works.  I went through the decision table and modified or deleted each
condition column until I isolated the problem condition.  It's a long story,
but the short version is that the condition did a string comparison using
the == operator, like this:

 job.legalActionType == "$param"

the field legalActionType is defined as a String.  When I changed this
condition to compare using equals():

job.legalActionType.equals("$param")

the problem went away, i.e. the rules fired normally whether loaded by
spring or by resource scanner.

In a nice twist, a few days after fixing this spreadsheet, one of our
business analyst rules writers came to me asking for help troubleshooting a
change he'd made to some rules.  He added some string comparisons but the
rules were not firing as expected.  I had him change the == comparisons to
equals(), and the rules fired normally.

I took this new file and stripped it down to a minimal drl file (3 rules)
and can repro this behavior in a unit test.  I found some other ways to
"fix" the rule, by adding conditions and by removing unused rules. I'm
working on building a set of files that I can load up in a bug report, but
in the meantime if anyone is interested, I'm attaching a short write-up of
the problem and the rule-based solutions.

Again if anyone has suggestions of other things I could look at to help
debug the problem, do let me know.  thanks also to Mark and Wolfgang for
earlier testing & debugging help.


http://drools.46999.n3.nabble.com/file/n4018884/equalsTesting.txt
equalsTesting.txt 




--
View this message in context: 
http://drools.46999.n3.nabble.com/Compiled-rules-differ-KnowledgeAgent-vs-ResourceChangeScanner-tp4018608p4018884.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Continuous Planning values for task planning

2012-07-24 Thread Josef Bajada
Hi Geoffrey,

Thanks for your reply.

> Does it make sense to wait longer than 7 mins after task A (presuming no
other task forces occupies the user at that time)?
> Put differently: Can we say that the starting time of B =
Math.max((endTime of task before B), (endTime of task A + 7 minutes))?
> If we can say that, it's pointless to investigate the solutions where
task B starts 8 minutes after task A and the user doing no task that last
minute.

Yes, the starting time of B = Math.max((endTime of task before B), (endTime
of task A + 7mins)) as long as it is smaller than (endTime of task A +
8mins).
Yes, it is pointless to investigate the solutions where task B starts 8
minutes after task A and the user doing no task that last minute.
The 8 minute is just a constraint that the task in between tasks A and B
cannot take longer than 7:59s.

I am thinking that maybe instead of using time itself as the planning
variable, we would use time just to determine the Hard and Soft scores.
So if Task B is scheduled after Task A + 8mins by the solver, then it
inflicts on the hard score. Similarly if Task B is scheduled before Task A
+ 7 mins.
Does my reasoning make sense in any way?

thanks,
Josef



On 24 July 2012 20:46, Geoffrey De Smet  wrote:

>
> Op 23-07-12 16:26, Josef Bajada schreef:
>
> Hi Geoffrey,
>
>  Well I want to leave 'space' between tasks in the situations where there
> are hard constraints that require me to put this space.
>
> This makes the chaining technique harder to model, but I wouldn't write it
> off yet.
>
>
>  As a simple example:
>
>  Task A: Put pasta in boiling water (duration 40 seconds)
> Task B: Take pasta out of boiling water (duration 50 seconds, cannot start
> before 7 mins after Task A finishes, cannot start after 8 mins after Task A
> finishes)
>
> Does it make sense to wait longer than 7 mins after task A (presuming no
> other task forces occupies the user at that time)?
> Put differently: Can we say that the starting time of B =
> Math.max((endTime of task before B), (endTime of task A + 7 minutes))?
> If we can say that, it's pointless to investigate the solutions where task
> B starts 8 minutes after task A and the user doing no task that last minute.
> If we can say that, then chaining can calculate the the starting time of a
> task on the fly differently.
>
>  Task C: Chop vegetables (duration 2 minutes).
>
>  This will evidently leave some gaps. The ideal result from the solver
> should be:
>
>  Task A: at time 0 (ends at 40s)
>  Task C: at time 41s (ends at 2:41)
> Task B: at time 7:40
>
>  There is a gap between C and B which is OK.
>
>  If another Task is added to the story:
>  Task D: Prepare sauce (duration 7 minutes)
>
>  I would want the following result:
>
>  Task A: at time 0 (ends at 40s)
> Task D: at time 41s (ends 7:41s)
> Task B: at time 8:42s (ends 9:32s)
> Task C: at time 9:33s (ends 11:33s)
>
>  Task C can actually take place before Task A too.
>
>  I still need to read and understand the chaining functionality properly.
> Do you think it would allow me to achieve the above?
>
>  I don't know.
> But using continuous variables in a search problem such as this that
> smells discrete with discrete constraints (A must start before B, ...),
> could blow up the search space unnecessarily.
>
> If you want to look into using continuous variables: the support for it is
> limited currently.
> you can reuse the Drools Planner metaheuristic algorithms (including
> termination, score, ...), but there's no decent generic move factory
> support for continuous variables yet.
> So you 'll have to write a custom MoveFactory that creates a limited
> subset of moves.
> Also, construction heuristics can't handle continuous variables yet, so
> you 'll have to write a custom SolutionIntializer.
> There are examples with a custom MoveFactory and a custom
> SolutionIntializer where you can copy paste from, but none with continuous
> variables at the moment.
>
>  thanks,
>
>  Josef
>
>
>
> On 22 July 2012 20:05, Geoffrey De Smet  wrote:
>
>>  Presuming that you don't want to leave space between tasks, you can
>> design your model differently by using the "chained" functionality:
>> it will be far more efficient and the planning variable won't be
>> continuous.
>>
>> Let's presume you're scheduling Tasks to Persons.
>>
>> @PlanningEntity
>> class Task implements TaskOrPerson {
>>
>> ...
>>
>> @PlanningVariable(chained = true)
>> @ValueRanges({
>> @ValueRange(type = ValueRangeType.FROM_SOLUTION_PROPERTY,
>> solutionProperty = "taskList"),
>> @ValueRange(type = ValueRangeType.FROM_SOLUTION_PROPERTY,
>> solutionProperty = "personList",
>> excludeUninitializedPlanningEntity = true)})
>> public TaskOrPerson getPreviousTaskOrPerson() {
>> return previousTaskOrPerson;
>> }
>>
>> public int getDuration() {
>> return duration;
>> }
>>
>> public int getStartingTime() {
>>   int startingTime = 0;
>> 

[rules-users] Moving comment in DSLR file causes issue under 5.3

2012-07-24 Thread drdaveg
This is an odd one.  I was testing some DSL and have been tracing back an
error in the translation.  The line marked in the code below, even as a
comment, causes multiple "cannot be resolved" errors when moved.  Any
thoughts on what could cause this other than a bug?

Note that almsot all of the code is commented and as it appears now
generates the errors.  If I move the line to the LHS the "cannot be
resolved" errors go away.  The only interesting thing shown in the DRL
viewer is that some of the comments appear duplicated.

rule "Compute"
when
#   Fare(fareBasisCode  == fp1) 
#ts1 : TrainSegment(fl1 : fareList)
#ts2 : TrainSegment(fl2 : fareList)
#mySol : Solution()
>   Fare(fp1 : fareBasisCode, thruFare == true) 
>x : FQ3()
#   eval(fl1.get(fp1 )!=null)
#   eval(fl2.get(fp1)!=null)
#   eval(mySol .nthSegment(ts1)==(mySol .nthSegment(ts2)+1))
then  
#   > //int n = fq.nthSegment(fp1)   ** moving this line can cause a
syntax error 
#   > FQ3 test = new FQ3(); test = fq;
>   System.out.println(fp1);
>   x.setPassengerString("T");  // x.getPassengerString()+
end 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Moving-comment-in-DSLR-file-causes-issue-under-5-3-tp4018882.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools/Tomcat/Mysql - dueling repository.xml's

2012-07-24 Thread mfeber
I am fairly new to Drools.  I am using guvnor 5.4.0. Final installed on
Tomcat 7.0.27.  Following the instructions in the documentation, I 
1) Defined/downloaded the a repository.xml pointing to a mysql instance
using the Administration -> Repository Configuration wizard. 
2) Stopped Tomcat, removed the $CATALINA_HOME/bin/repository.xml and
repository directory
3) Copied the new repository.xml to $CATALINA_HOME/bin
4) Started Tomcat
5) Using guvnor, my assets were created/stored in the mysql db
6) Stopped Tomcat
7) Started Tomcat
8) Guvnor wrote a new repository.xml into $CATALINA_HOME (NOT
$$CATALINA_HOME/bin which still contained the db version created in step 1.)
and had 'forgotten' about the assets created in step 5.
9) Stopped Tomcat
10) Replaced the $CATALINA_HOME/repository.xml with a copy of the
$CATALINA_HOME/bin/repository.xml. 
11) Started Tomcat
12) Guvnor started using the mysql instance again and 'remembered' the
assets from step 5

Now there are two repository.xml files in $CATALINA_HOME and
$CATALINA_HOME/bin.  This should not be necessary re the documentation.

Why did it create a new repository/repository.xml in $CATALINA_HOME after a
Tomcat restart? 
Which repository.xml is it really using now?
How can I convince it to only use one of them?

[Also of note: the workspace.xml files in
$CATALINA_HOME/repository/workspaces/default and
$CATALINA_HOME/bin/repository/workspaces/default are identical after step
11.]

Thanks,
   Mark 




--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Tomcat-Mysql-dueling-repository-xml-s-tp4018881.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to make available declarative model to all packages.

2012-07-24 Thread Michael Anstis
TBH, I don't understand what it is you are having problems with: this
thread seems to have gone full-circle.

As Esteban states, to share a model in multiple Guvnor packages you need to:
1) Create a model in the Global Area
2) Create a mode in the individual package (choosing to import from Global
Area)

The model can be either POJO or Declarative (as long as they are consistent
across Global Area and packages).

Regarding your KnowledgeBuilder problem. Do the packages build in Guvnor?

On 24 July 2012 16:36, rodolphio  wrote:

> I have made following:
>
> In Guvnor you have to create a Model also in your specific packages and
> select "import from global area". Then you have to go to the configuration
> of the package and add the classes you want to use in your package.
>
> My problem is that i can't add the classes I want to use in my package.
>
> And than I tried to resolve the problem by deleting the imported
> declarative
> model from the package and deleting the declarative model, I can't create a
> declarative model in global area without creating automatically the same
> declarative model in the package I want to import it.
>
>
> Any advices? Thanks a lot
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018875.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> 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


Re: [rules-users] Continuous Planning values for task planning

2012-07-24 Thread Geoffrey De Smet


Op 23-07-12 16:26, Josef Bajada schreef:

Hi Geoffrey,

Well I want to leave 'space' between tasks in the situations where 
there are hard constraints that require me to put this space.
This makes the chaining technique harder to model, but I wouldn't write 
it off yet.


As a simple example:

Task A: Put pasta in boiling water (duration 40 seconds)
Task B: Take pasta out of boiling water (duration 50 seconds, cannot 
start before 7 mins after Task A finishes, cannot start after 8 mins 
after Task A finishes)
Does it make sense to wait longer than 7 mins after task A (presuming no 
other task forces occupies the user at that time)?
Put differently: Can we say that the starting time of B = 
Math.max((endTime of task before B), (endTime of task A + 7 minutes))?
If we can say that, it's pointless to investigate the solutions where 
task B starts 8 minutes after task A and the user doing no task that 
last minute.
If we can say that, then chaining can calculate the the starting time of 
a task on the fly differently.

Task C: Chop vegetables (duration 2 minutes).

This will evidently leave some gaps. The ideal result from the solver 
should be:


Task A: at time 0 (ends at 40s)
Task C: at time 41s (ends at 2:41)
Task B: at time 7:40

There is a gap between C and B which is OK.

If another Task is added to the story:
Task D: Prepare sauce (duration 7 minutes)

I would want the following result:

Task A: at time 0 (ends at 40s)
Task D: at time 41s (ends 7:41s)
Task B: at time 8:42s (ends 9:32s)
Task C: at time 9:33s (ends 11:33s)

Task C can actually take place before Task A too.

I still need to read and understand the chaining functionality 
properly. Do you think it would allow me to achieve the above?



I don't know.
But using continuous variables in a search problem such as this that 
smells discrete with discrete constraints (A must start before B, ...), 
could blow up the search space unnecessarily.


If you want to look into using continuous variables: the support for it 
is limited currently.
you can reuse the Drools Planner metaheuristic algorithms (including 
termination, score, ...), but there's no decent generic move factory 
support for continuous variables yet.
So you 'll have to write a custom MoveFactory that creates a limited 
subset of moves.
Also, construction heuristics can't handle continuous variables yet, so 
you 'll have to write a custom SolutionIntializer.
There are examples with a custom MoveFactory and a custom 
SolutionIntializer where you can copy paste from, but none with 
continuous variables at the moment.

thanks,

Josef



On 22 July 2012 20:05, Geoffrey De Smet > wrote:


Presuming that you don't want to leave space between tasks, you
can design your model differently by using the "chained"
functionality:
it will be far more efficient and the planning variable won't be
continuous.

Let's presume you're scheduling Tasks to Persons.

@PlanningEntity
class Task implements TaskOrPerson {

...

@PlanningVariable(chained = true)
@ValueRanges({
@ValueRange(type =
ValueRangeType.FROM_SOLUTION_PROPERTY, solutionProperty = "taskList"),
@ValueRange(type =
ValueRangeType.FROM_SOLUTION_PROPERTY, solutionProperty =
"personList",
excludeUninitializedPlanningEntity = true)})
public TaskOrPerson getPreviousTaskOrPerson() {
return previousTaskOrPerson;
}

public int getDuration() {
return duration;
}

public int getStartingTime() {
  int startingTime = 0;
  TaskOrPerson taskOrPerson = getPreviousTaskOrPerson();
  while (taskOrPerson instanceof Task) { // Every chain is
guarantee to end up with an anchor (= Person)
startingTime += ((Task) taskOrPerson).getDuration();
taskOrPerson = ((Task)
taskOrPerson).getPreviousTaskOrPerson()
  }
  return startingTime;
}

}

class Person implements TaskOrPerson {

}

For a good example, take a look at the VehicleRouting example.
For more info about chaining, in the manual see section 4.3.4.2.6.
Chained

http://docs.jboss.org/drools/release/5.4.0.Final/drools-planner-docs/html_single/index.html

Op 22-07-12 18 :00, Josef Bajada schreef:

Hi,

I am new to Drools and Drools Planner, so apologies if I am
asking anything obvious.

My objective is to implement a simple (for now) planner which
schedules tasks according to 2 main criteria:
- Their duration (in seconds)
- Their dependencies on other tasks (e.g. Hard Constraint that
Task B has to start between 180 and 200 seconds after Task A
finishes).

Since there are gaps between dependent tasks as part of the hard
constraints other tasks can be fitted in between dependent tasks.
So the Solver needs to f

Re: [rules-users] MVEL optimizer error

2012-07-24 Thread gboro54
Any thoughts on this at all?



--
View this message in context: 
http://drools.46999.n3.nabble.com/MVEL-optimizer-error-tp4018714p4018877.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread Edson Tirelli
   You are trying to avoid the issue. As reported by others, your
conditions should be inside the patterns, not in "or'd" evals in the end,
and yes, it is possible to generate rules like that in an automated program.

   Now, the reason it is taking so long is because of the "or"s. I don't
think there is any bug there. Just for you to understand, an OR is just
syntax sugar for multiple rules. So if you have a rule that says:

A() or B()

   The engine is actually creating 2 rules:

rule 1 when
   A()
...

rule 2 when
   B()
...

I.e., it generates all possible combinations of rules, one for each of
your logical branches.

Now, I quickly counted 26 "or"s in your rule. It is quite possible that
the engine is generating all possible combinations of rules for all your
ORs, and that is roughly (there are some factors that influence the number
of rules): 2^26 == 67108864 rules. To compile 67 million rules, it can
indeed take some time.

I don't know for sure if that is the case without looking at your
application, but to solve your problem you should fix your rule generation,
not look for a problem elsewhere.

Edson

On Tue, Jul 24, 2012 at 9:29 AM, fx242  wrote:

> I understand that the rule looks pointless and under-optimized, but it's
> the
> only way I could represent this kind of rule in an automated way (I didn't
> write the rule by hand). Basically with these rules I try to pre-compute
> the
> amount of some products on the WM (using count() inside a accumulate
> function) resulting in a Number(), and then on the last condition I
> evaluate
> some arbitrary arithmetic operation using the variables inside the Number()
> object.
> For more details for examples see my previous post where I've tried to
> address this issue:
>
> http://drools.46999.n3.nabble.com/drools-arithmetics-without-eval-td3823232.html
>
> So, considerations apart of the way the rule is written, I still think
> there
> is a bug or something similar on the RETE compiler, that causes this rule
> to
> be processed in a very expensive way. Can someone confirm this, and try to
> sugest an alternative? Maybe It's something that is already fixed on newer
> versions as sugested by Esteban?
>
> Regards,
> Tiago Lopes
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018870.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to make available declarative model to all packages.

2012-07-24 Thread rodolphio
I have made following:

In Guvnor you have to create a Model also in your specific packages and
select "import from global area". Then you have to go to the configuration
of the package and add the classes you want to use in your package.

My problem is that i can't add the classes I want to use in my package.

And than I tried to resolve the problem by deleting the imported declarative
model from the package and deleting the declarative model, I can't create a
declarative model in global area without creating automatically the same
declarative model in the package I want to import it.


Any advices? Thanks a lot



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018875.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Vincent LEGENDRE

> Our application is using this url: 
> http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST
>  
> to loading from Guvnor5.3.0 the pkg. Is it correct? 


Yes, to get the compiled package, compiled inside Guvnor , but this is the 
problem here. 

The compiled package is a serialized kPackage object . When you get this from 
guvnor, and put it inside your kBase, the object is simply deserialized. The 
ObjectTypeConf conf .getTypeDeclaration() will look in the kBase, and for 
guvnor compiled package this method returns null (don't know why). I think you 
may have a difference between your Guvnor version and the drools runtime 
version. 


You can either use the source got from guvnor ( 
http://localhost:8080/guvnor/rest/packages/org.dfms.model/source ) to build 
your kBase, and this should work fine. 




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


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Wolfgang Laun
On 24/07/2012, Vincent LEGENDRE  wrote:
>
>
>> @Vincent: I'm concerned about the first stack trace line, which is
>> where no executable code can be. Clear this up first...
>
> Me ? Really no idea why this line ...
> This line, in 5.3 code, is the class declaration. Indeed, node an executable
> piece of code ...

I've looked at the byte code, and there are a couple of methods
starting at line 48: insert( Object ) and getFactHandle( Object ).
Probably due to some optimisation resulting from the peculiar
parameter passing from one call to the only method call inside the
originally called method.

Still, very confusing,...

So, the NPE is not due to some confusion with the object code.

I have noticed that there are other threads running where differences
between executions from Guvnor and local deployments are reported.

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


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Carolina Pellecchia
Hello, I made another test.


I downloaded the source


URL for package source:

http://localhost:8080/guvnor/rest/packages/org.dfms.model/source


from Guvnor, then I saved the file like drl on file system and I tried
loading this drl file through application and all have worked fine.


Our application is using this url:
http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST


to loading from Guvnor5.3.0 the pkg. Is it correct?


Thanks in advanced

Carolina


2012/7/24 Vincent LEGENDRE 

>
> > @Vincent: I'm concerned about the first stack trace line, which is
> > where no executable code can be. Clear this up first...
>
> Me ? Really no idea why this line ...
> This line, in 5.3 code, is the class declaration. Indeed, node an
> executable piece of code ...
>
> I've found another thread :
> http://drools.46999.n3.nabble.com/rules-users-Drools-5-4-0-FINAL-and-OSGI-Unable-to-instantiate-service-for-Class-org-drools-concurren-td4017660.html
> where we can see a stack trace giving a
> "org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:53) " which
> is the class declaration line in 5.4 source code...
>
> May be that some JVMs points that because there are some static inits in
> the class ?
> Or may be some AOP usage ?
>
> All other line calls (insert etc etc) matches exactly the lines shown in
> the stack trace, so to me, it is not so important ... at least not for the
> problem here.
> The real problem is why ObjectTypeConf conf.getTypeDeclaration();
> returns null using Guvnor compiled pkg and not via DRL local compilation
> ...
>
>
> ___
> 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


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Vincent LEGENDRE


> @Vincent: I'm concerned about the first stack trace line, which is 
> where no executable code can be. Clear this up first... 

Me ? Really no idea why this line ... 
This line, in 5.3 code, is the class declaration. Indeed, node an executable 
piece of code ... 

I've found another thread : 
http://drools.46999.n3.nabble.com/rules-users-Drools-5-4-0-FINAL-and-OSGI-Unable-to-instantiate-service-for-Class-org-drools-concurren-td4017660.html
 
where we can see a stack trace giving a 
"org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:53) " which is 
the class declaration line in 5.4 source code... 

May be that some JVMs points that because there are some static inits in the 
class ? 
Or may be some AOP usage ? 

All other line calls (insert etc etc) matches exactly the lines shown in the 
stack trace, so to me, it is not so important ... at least not for the problem 
here. 
The real problem is why ObjectTypeConf conf .getTypeDeclaration(); 
returns null using Guvnor compiled pkg and not via DRL local compilation ... 

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


Re: [rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread fx242
I understand that the rule looks pointless and under-optimized, but it's the
only way I could represent this kind of rule in an automated way (I didn't
write the rule by hand). Basically with these rules I try to pre-compute the
amount of some products on the WM (using count() inside a accumulate
function) resulting in a Number(), and then on the last condition I evaluate
some arbitrary arithmetic operation using the variables inside the Number()
object.
For more details for examples see my previous post where I've tried to
address this issue:
http://drools.46999.n3.nabble.com/drools-arithmetics-without-eval-td3823232.html

So, considerations apart of the way the rule is written, I still think there
is a bug or something similar on the RETE compiler, that causes this rule to
be processed in a very expensive way. Can someone confirm this, and try to
sugest an alternative? Maybe It's something that is already fixed on newer
versions as sugested by Esteban?

Regards,
Tiago Lopes



--
View this message in context: 
http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018870.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] retract + @expires == memory leak ??

2012-07-24 Thread Ladd
No comments or workarounds suggested so I created a bug report for it after
searching to see if had already been reported.

https://issues.jboss.org/browse/JBRULES-3583



--
View this message in context: 
http://drools.46999.n3.nabble.com/retract-expires-memory-leak-tp4018807p4018869.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Wolfgang Laun
@Vincent: I'm concerned about the first stack trace line, which is
where no executable code can be. Clear this up first...

Sure it's possible that there is a bug. But it's hidden deep. Could be
some inconsistency between the Guvnor build and the deploying system.
I'm inclined to believe that the same app might work nicely if
everything were compiled locally.

-W


On 24/07/2012, Vincent LEGENDRE  wrote:
> I guess that entryPoints is a map that you build at init.
> Are you sure that the entry points in it are in sync with the actual session
> ?
> Why not using kSession.getWorkingMemoryEntryPoint(name).insert(...) directly
> ?
>
> @Wolfgang : Why can't there be a bug in NamedEntryPoint.insert(...) ? Having
> a NPE here is problematic, especially for a internal variable got from
> inside the same internal method. May be this is not called a bug, but at
> least the exception should be more explicative..
>
> Best guess for now is that the problem is inside your code (dont know where)
> and not inside drools code. The NPE, even if it should have been more user
> friendly, is certainly just a consequence of a bad usage somewhere. If it
> works well using DRL, and not using Guvnor, it may be a good track to
> follow. If you have the same usage (session creation, inserts, fire ...),
> then you have differences between the two ruleset (rules and/or model is
> different). With Guvnor, you can also download the "source" (just like a big
> DRL) instead of the pkg. This can be a solution too.
>
>
> - Mail original -
>
> De: "Carolina Pellecchia" 
> À: "Rules Users List" 
> Envoyé: Mardi 24 Juillet 2012 14:27:34
> Objet: Re: [rules-users] java.lang.NullPointerException at
> org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
>
>
>
> The entryPoint and obs aren't null. I'm sorry, where do you see the error?
>
>
> Carolina
>
> 2012/7/24 Wolfgang Laun < wolfgang.l...@gmail.com >
>
>
> Well, then it's a bug in your code. Do we all agree on this now?
>
> -W
>
>
>
> On 24/07/2012, Carolina Pellecchia < carolina.pellecc...@gmail.com > wrote:
>
If there is an insert() call in
org.tass.utils.ExpertSystemManager.java in line 156 then *this* is
where the insert occurs, not the insert() in the rule.
>>
>> org.tass.utils.ExpertSystemManager.java is our class and the source code
>> is
>> this:
>>
>> 153. *public* *void* insertObservation(String entryPoint,
>> Observation obs) {
>>
>>
>> 154. *try* {
>>
>> 155. *if*(entryPoints.containsKey(entryPoint)) {
>
>>
>> 156. entryPoints.get(entryPoint).insert(obs);
>>
>> 157.
>>
>> 158. ksession.fireAllRules();
>>
>> 159. }
>>
>> 160. }
>>
>> 161. *catch* (Exception e) {
>
>
>>
>> 162. logger.error(e, e);
>>
>> 163. }
>>
>> 164. }
>>
Where is org.tass.utils coming from?
>>
>> Where is org.tass.utils coming from? it is our class.
>>
>>
It's still a mystery to me how it's possible to have a stack trace
element from NamedEntryPoint.java line 48 - there's no code in this
line.
>>
>>
>> I agree, at the line 48 there isn't code. It would seem that "Drools 5.3.0
>>
>> final" has different binary and source code.
>>
>>
There is another mystery : why this is working when getting rules from a

>> DRL file and not from Guvnor ...
Did you add the POJO model into the Guvnor's package ?
>>
>>
>> Yes, I did.
>>
But if this is it, package compilation should raise a compilation error
>> ...
>>
>>
>> The package compilation is ok.
>>
>>
What is sure is that the problem does not comes from the rules, as the
>> stack trace shows an "insert" call outside the rules, otherwise there
>> would
>> be a >>reteoo...ConsequenceInvocator (something like that) before ..
>>
>>
>> yes, It is sure
>>
>>
And a last question : is "org.tass.utils.ExpertSystemManager" a class
>> from you, or does it take place into another third-party framework (that
>> could use a >>different or modified version of drools).
>>
>>
>> org.tass.utils.ExpertSystemManager.java is our class. We aren't using
>> third-party
>> framework.
>>
>>
>> Thank you
>>
>> Carolina
>>
>>
>> 2012/7/23 Vincent LEGENDRE < vincent.legen...@eurodecision.com >
>>
>>> There is another mystery : why this is working when getting rules from a
>>>
>>> DRL file and not from Guvnor ...
>>> Did you add the POJO model into the Guvnor's package ?
>>> But if this is it, package compilation should raise a compilation error
>>> ...
>>>
>>> What is sure is that the problem does not comes from the rules, as the
>>> stack trace shows an "insert" call outside the rules, otherwise there
>>> would
>>> be a reteoo...ConsequenceInvocator (something like that) before ..
>>>
>>> And a last question : is "org.tass.utils.ExpertSystemManager" a class
>>> from
>>> you, or does it take place into another third-party framework (that could
>>>
>>> use a different or modified version of drools).
>>>
>>>
>>> ___
>>> rules-users mailing list
>>> rules-users@lists.

Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Vincent LEGENDRE
I guess that entryPoints is a map that you build at init. 
Are you sure that the entry points in it are in sync with the actual session ? 
Why not using kSession.getWorkingMemoryEntryPoint(name).insert(...) directly ? 

@Wolfgang : Why can't there be a bug in NamedEntryPoint.insert(...) ? Having a 
NPE here is problematic, especially for a internal variable got from inside the 
same internal method. May be this is not called a bug, but at least the 
exception should be more explicative.. 

Best guess for now is that the problem is inside your code (dont know where) 
and not inside drools code. The NPE, even if it should have been more user 
friendly, is certainly just a consequence of a bad usage somewhere. If it works 
well using DRL, and not using Guvnor, it may be a good track to follow. If you 
have the same usage (session creation, inserts, fire ...), then you have 
differences between the two ruleset (rules and/or model is different). With 
Guvnor, you can also download the "source" (just like a big DRL) instead of the 
pkg. This can be a solution too. 


- Mail original -

De: "Carolina Pellecchia"  
À: "Rules Users List"  
Envoyé: Mardi 24 Juillet 2012 14:27:34 
Objet: Re: [rules-users] java.lang.NullPointerException at 
org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
 


The entryPoint and obs aren't null. I'm sorry, where do you see the error? 


Carolina 

2012/7/24 Wolfgang Laun < wolfgang.l...@gmail.com > 


Well, then it's a bug in your code. Do we all agree on this now? 

-W 



On 24/07/2012, Carolina Pellecchia < carolina.pellecc...@gmail.com > wrote: 
>>>If there is an insert() call in 
>>>org.tass.utils.ExpertSystemManager.java in line 156 then *this* is 
>>>where the insert occurs, not the insert() in the rule. 
> 
> org.tass.utils.ExpertSystemManager.java is our class and the source code is 
> this: 
> 
> 153. *public* *void* insertObservation(String entryPoint, 
> Observation obs) { 
> 
> 
> 154. *try* { 
> 
> 155. *if*(entryPoints.containsKey(entryPoint)) { 

> 
> 156. entryPoints.get(entryPoint).insert(obs); 
> 
> 157. 
> 
> 158. ksession.fireAllRules(); 
> 
> 159. } 
> 
> 160. } 
> 
> 161. *catch* (Exception e) { 


> 
> 162. logger.error(e, e); 
> 
> 163. } 
> 
> 164. } 
> 
>>>Where is org.tass.utils coming from? 
> 
> Where is org.tass.utils coming from? it is our class. 
> 
> 
>>>It's still a mystery to me how it's possible to have a stack trace 
>>>element from NamedEntryPoint.java line 48 - there's no code in this 
>>>line. 
> 
> 
> I agree, at the line 48 there isn't code. It would seem that "Drools 5.3.0 
> final" has different binary and source code. 
> 
> 
>>>There is another mystery : why this is working when getting rules from a 
> DRL file and not from Guvnor ... 
>>>Did you add the POJO model into the Guvnor's package ? 
> 
> 
> Yes, I did. 
> 
>>>But if this is it, package compilation should raise a compilation error 
> ... 
> 
> 
> The package compilation is ok. 
> 
> 
>>>What is sure is that the problem does not comes from the rules, as the 
> stack trace shows an "insert" call outside the rules, otherwise there would 
> be a >>reteoo...ConsequenceInvocator (something like that) before .. 
> 
> 
> yes, It is sure 
> 
> 
>>>And a last question : is "org.tass.utils.ExpertSystemManager" a class 
> from you, or does it take place into another third-party framework (that 
> could use a >>different or modified version of drools). 
> 
> 
> org.tass.utils.ExpertSystemManager.java is our class. We aren't using 
> third-party 
> framework. 
> 
> 
> Thank you 
> 
> Carolina 
> 
> 
> 2012/7/23 Vincent LEGENDRE < vincent.legen...@eurodecision.com > 
> 
>> There is another mystery : why this is working when getting rules from a 
>> DRL file and not from Guvnor ... 
>> Did you add the POJO model into the Guvnor's package ? 
>> But if this is it, package compilation should raise a compilation error 
>> ... 
>> 
>> What is sure is that the problem does not comes from the rules, as the 
>> stack trace shows an "insert" call outside the rules, otherwise there 
>> would 
>> be a reteoo...ConsequenceInvocator (something like that) before .. 
>> 
>> And a last question : is "org.tass.utils.ExpertSystemManager" a class 
>> from 
>> you, or does it take place into another third-party framework (that could 
>> use a different or modified version of drools). 
>> 
>> 
>> ___ 
>> 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 




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

___
rules-users mailing list
rules-users@

Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Wolfgang Laun
On 24/07/2012, Carolina Pellecchia  wrote:
> The entryPoint and obs aren't null. I'm sorry, where do you see the error?

No surprise: If the entryPoint were null, you'd have a NPE right
there, and not in NamedEntryPoint. If obs were null, nothing at all
would happen.

I'm investigating a little.

-W

>
>
> Carolina
>
> 2012/7/24 Wolfgang Laun 
>
>> Well, then it's a bug in your code. Do we all agree on this now?
>>
>> -W
>>
>>
>> On 24/07/2012, Carolina Pellecchia  wrote:
>> >>>If there is an insert() call in
>> >>>org.tass.utils.ExpertSystemManager.java in line 156 then *this* is
>> >>>where the insert occurs, not the insert() in the rule.
>> >
>> > org.tass.utils.ExpertSystemManager.java is our class and the source
>> > code
>> is
>> > this:
>> >
>> > 153. *public* *void* insertObservation(String entryPoint,
>> > Observation obs) {
>> >
>> >
>> > 154. *try* {
>> >
>> > 155. *if*(entryPoints.containsKey(entryPoint)) {
>> >
>> > 156. entryPoints.get(entryPoint).insert(obs);
>> >
>> > 157.
>> >
>> > 158. ksession.fireAllRules();
>> >
>> > 159. }
>> >
>> > 160. }
>> >
>> > 161. *catch* (Exception e) {
>> >
>> > 162. logger.error(e, e);
>> >
>> > 163. }
>> >
>> > 164. }
>> >
>> >>>Where is org.tass.utils coming from?
>> >
>> > Where is org.tass.utils coming from? it is our class.
>> >
>> >
>> >>>It's still a mystery to me how it's possible to have a stack trace
>> >>>element from NamedEntryPoint.java line 48 - there's no code in this
>> >>>line.
>> >
>> >
>> > I agree, at the line 48 there isn't code. It would seem that "Drools
>> 5.3.0
>> > final" has different binary and  source code.
>> >
>> >
>> >>>There is another mystery : why this is working when getting rules from
>> >>> a
>> > DRL file and not from Guvnor ...
>> >>>Did you add the POJO model into the Guvnor's package ?
>> >
>> >
>> > Yes, I did.
>> >
>> >>>But if this is it, package compilation should raise a compilation
>> >>> error
>> > ...
>> >
>> >
>> > The package compilation is ok.
>> >
>> >
>> >>>What is sure is that the problem does not comes from the rules, as the
>> > stack trace shows an "insert" call outside the rules, otherwise there
>> would
>> > be a >>reteoo...ConsequenceInvocator (something like that) before ..
>> >
>> >
>> > yes, It is sure
>> >
>> >
>> >>>And a last question : is "org.tass.utils.ExpertSystemManager" a class
>> > from you, or does it take place into another third-party framework
>> > (that
>> > could use a >>different or modified version of drools).
>> >
>> >
>> > org.tass.utils.ExpertSystemManager.java is our class. We aren't using
>> > third-party
>> > framework.
>> >
>> >
>> > Thank you
>> >
>> > Carolina
>> >
>> >
>> > 2012/7/23 Vincent LEGENDRE 
>> >
>> >> There is another mystery : why this is working when getting rules from
>> >> a
>> >> DRL file and not from Guvnor ...
>> >> Did you add the POJO model into the Guvnor's package ?
>> >> But if this is it, package compilation should raise a compilation
>> >> error
>> >> ...
>> >>
>> >> What is sure is that the problem does not comes from the rules, as the
>> >> stack trace shows an "insert" call outside the rules, otherwise there
>> >> would
>> >> be a reteoo...ConsequenceInvocator (something like that) before ..
>> >>
>> >> And a last question : is "org.tass.utils.ExpertSystemManager" a class
>> >> from
>> >> you, or does it take place into another third-party framework (that
>> could
>> >> use a different or modified version of drools).
>> >>
>> >>
>> >> ___
>> >> 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
>>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Using Global Model for all packages

2012-07-24 Thread Michael Anstis
Sounds like there's a problem :(

Could somebody please raise a JIRA (for  Guvnor) and provide full details
of exactly what the problem is (including a repository export, if possible).

With kind regards,

Mike

On 24 July 2012 13:20, Vincent LEGENDRE
wrote:

> Never managed to get that working properly too ...
>
> 3 options :
>- Try again to really share the model from global area to all package.
>- Put the jars in Guvnor classpath (or tomcat classpath)
>- Write a REST client that upload the jar to all packages.
>
> --
> *De: *"starfish15" 
> *À: *rules-users@lists.jboss.org
> *Envoyé: *Mardi 24 Juillet 2012 14:15:45
> *Objet: *[rules-users] Using Global Model for all packages
>
>
> Hi Admins,
>
> I have been using GUVNOR 5.2 from sometime now. We have different packages
> created, as per the requirement of different teams. However, they do use
> the
> same MODEL. I was wondering if we could simply upload a jar in the global
> area, and use the same in every other package. I know that we can create
> models for each package and say Import asset from global area. However
> doing
> the same again and again, isnt helping me in any manner.
>
> The rules arent getting updated with the class files and the rules
> validation failes with in the Business Rule Assets.
>
> Is it that this doesnt work or is it that am missing on something???
>
> Kindly assist ASAP.
>
> Regards,
> starfish
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Using-Global-Model-for-all-packages-tp4018861.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> 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
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Carolina Pellecchia
The entryPoint and obs aren't null. I'm sorry, where do you see the error?


Carolina

2012/7/24 Wolfgang Laun 

> Well, then it's a bug in your code. Do we all agree on this now?
>
> -W
>
>
> On 24/07/2012, Carolina Pellecchia  wrote:
> >>>If there is an insert() call in
> >>>org.tass.utils.ExpertSystemManager.java in line 156 then *this* is
> >>>where the insert occurs, not the insert() in the rule.
> >
> > org.tass.utils.ExpertSystemManager.java is our class and the source code
> is
> > this:
> >
> > 153. *public* *void* insertObservation(String entryPoint,
> > Observation obs) {
> >
> >
> > 154. *try* {
> >
> > 155. *if*(entryPoints.containsKey(entryPoint)) {
> >
> > 156. entryPoints.get(entryPoint).insert(obs);
> >
> > 157.
> >
> > 158. ksession.fireAllRules();
> >
> > 159. }
> >
> > 160. }
> >
> > 161. *catch* (Exception e) {
> >
> > 162. logger.error(e, e);
> >
> > 163. }
> >
> > 164. }
> >
> >>>Where is org.tass.utils coming from?
> >
> > Where is org.tass.utils coming from? it is our class.
> >
> >
> >>>It's still a mystery to me how it's possible to have a stack trace
> >>>element from NamedEntryPoint.java line 48 - there's no code in this
> >>>line.
> >
> >
> > I agree, at the line 48 there isn't code. It would seem that "Drools
> 5.3.0
> > final" has different binary and  source code.
> >
> >
> >>>There is another mystery : why this is working when getting rules from a
> > DRL file and not from Guvnor ...
> >>>Did you add the POJO model into the Guvnor's package ?
> >
> >
> > Yes, I did.
> >
> >>>But if this is it, package compilation should raise a compilation error
> > ...
> >
> >
> > The package compilation is ok.
> >
> >
> >>>What is sure is that the problem does not comes from the rules, as the
> > stack trace shows an "insert" call outside the rules, otherwise there
> would
> > be a >>reteoo...ConsequenceInvocator (something like that) before ..
> >
> >
> > yes, It is sure
> >
> >
> >>>And a last question : is "org.tass.utils.ExpertSystemManager" a class
> > from you, or does it take place into another third-party framework (that
> > could use a >>different or modified version of drools).
> >
> >
> > org.tass.utils.ExpertSystemManager.java is our class. We aren't using
> > third-party
> > framework.
> >
> >
> > Thank you
> >
> > Carolina
> >
> >
> > 2012/7/23 Vincent LEGENDRE 
> >
> >> There is another mystery : why this is working when getting rules from a
> >> DRL file and not from Guvnor ...
> >> Did you add the POJO model into the Guvnor's package ?
> >> But if this is it, package compilation should raise a compilation error
> >> ...
> >>
> >> What is sure is that the problem does not comes from the rules, as the
> >> stack trace shows an "insert" call outside the rules, otherwise there
> >> would
> >> be a reteoo...ConsequenceInvocator (something like that) before ..
> >>
> >> And a last question : is "org.tass.utils.ExpertSystemManager" a class
> >> from
> >> you, or does it take place into another third-party framework (that
> could
> >> use a different or modified version of drools).
> >>
> >>
> >> ___
> >> 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
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Using Global Model for all packages

2012-07-24 Thread Vincent LEGENDRE
Never managed to get that working properly too ... 

3 options : 
- Try again to really share the model from global area to all package. 
- Put the jars in Guvnor classpath (or tomcat classpath) 
- Write a REST client that upload the jar to all packages. 

- Mail original -

De: "starfish15"  
À: rules-users@lists.jboss.org 
Envoyé: Mardi 24 Juillet 2012 14:15:45 
Objet: [rules-users] Using Global Model for all packages 

Hi Admins, 

I have been using GUVNOR 5.2 from sometime now. We have different packages 
created, as per the requirement of different teams. However, they do use the 
same MODEL. I was wondering if we could simply upload a jar in the global 
area, and use the same in every other package. I know that we can create 
models for each package and say Import asset from global area. However doing 
the same again and again, isnt helping me in any manner. 

The rules arent getting updated with the class files and the rules 
validation failes with in the Business Rule Assets. 

Is it that this doesnt work or is it that am missing on something??? 

Kindly assist ASAP. 

Regards, 
starfish 



-- 
View this message in context: 
http://drools.46999.n3.nabble.com/Using-Global-Model-for-all-packages-tp4018861.html
 
Sent from the Drools: User forum mailing list archive at Nabble.com. 
___ 
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


Re: [rules-users] Using Global Model for all packages

2012-07-24 Thread abhinay_agarwal
Even i had the same and it doesnt get resolved in 5.4 even !!

reference : 
http://drools.46999.n3.nabble.com/Import-into-specific-package-GUVNOR-help-td4018325.html#a4018328
http://drools.46999.n3.nabble.com/Import-into-specific-package-GUVNOR-help-td4018325.html#a4018328
 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-Global-Model-for-all-packages-tp4018861p4018862.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Using Global Model for all packages

2012-07-24 Thread starfish15
Hi Admins,

I have been using GUVNOR 5.2 from sometime now. We have different packages
created, as per the requirement of different teams. However, they do use the
same MODEL. I was wondering if we could simply upload a jar in the global
area, and use the same in every other package. I know that we can create
models for each package and say Import asset from global area. However doing
the same again and again, isnt helping me in any manner.

The rules arent getting updated with the class files and the rules
validation failes with in the Business Rule Assets.

Is it that this doesnt work or is it that am missing on something???

Kindly assist ASAP.

Regards,
starfish



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-Global-Model-for-all-packages-tp4018861.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread FrankVhh
Hi,

There is something that I must ask... Why do you evaluate perfectly simple
patterns in an eval, I wonder?

rule "CONFIG_1-3UCO07"
salience -90
when
Number(rel_4226982244: intValue < 1 )
Number(rel_7521194: intValue < 1 )
Number(rel_787633980: intValue < 1 )
Number(qty_1331544548: intValue != 1 )
Number(rel_1425187049: intValue != 1 )
Number(rel_1180441096: intValue != 1 )
Number(rel_3132221704: intValue != 1 )
Number(rel_1663554156: intValue != 1 )
Number(rel_1940612775: intValue != 1 )
Number(rel_1735126416: intValue != 1 )
Number(rel_3962361266: intValue != 1 )
Number(rel_882187: intValue != 1 )
Number(rel_1169008280: intValue != 1 )
Number(rel_3495503197: intValue != 1 )
Number(rel_70290066: intValue != 1 )
Number(rel_1333860961: intValue != 1 )
Number(rel_2793542368: intValue != 1 )
Number(rel_952404632: intValue != 1 )
Number(rel_2712335119: intValue != 1 )
Number(qty_4276673135: intValue != 1 )
Number(qty_3950051097: intValue != 1 )
Number(rel_3391032645: intValue != 1 )
Number(rel_2738029181: intValue != 1 )
Number(qty_4125201080: intValue != 1 )
Number(rel_663254919: intValue != 1 )
Number(rel_3059142355: intValue != 1 )
then
vh.error(kcontext, "Error ...");
end 

Of course, this is still nonsense as long as you do not have a way to
constrain the number that you evaluate. The rule, as written above, will
fire from the moment you have one single number that has an intValue below
1.

Regards,
Frank



--
View this message in context: 
http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018860.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread Wolfgang Laun
There are 26 patterns Number(). Now I don't know how many facts of
that type you have, but this sequence will produce all combinations of
all available facts. (This is the worst example of this anti-pattern
I've seen.)

The or-ed evals will try to create parallel nodes in the network, and
the not should guarantee that none of those exists.

I'm not sure what the rule should actually ascertain. Could you
provide a simple example, using 3 numbers, describing verbally or by a
regular boolean expression when the rule should fire?

E.g. "it should fire if there is one Number != 1, another Number < 1
and a third Number != 1"

-W



On 24/07/2012, Esteban Aliverti  wrote:
> As far as I remember, there were some fixes around compilation time for
> edge cases in 5.4. Could you please give a try to 5.4 or even 5.5-SNAPSHOT?
>
> Best Regards,
>
> 
>
> Esteban Aliverti
> - Blog @ http://ilesteban.wordpress.com
>
>
> On Tue, Jul 24, 2012 at 1:11 PM, Wolfgang Laun
> wrote:
>
>> On 24/07/2012, fx242  wrote:
>> > Hi,
>> >
>> >  This single
>> > rule was taking all the 4h to compile!
>> > I'm using DROOLS 5.2 Final.
>> > The rule example below samples the problem (don't mind the nonsense
>> > Number()
>> > conditions):
>> >
>>
>> Well, I do mind the "nonsense Number()". There's no point in
>> discussing this if you don't post an exact image of your rule.
>>
>> -W
>> ___
>> 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


Re: [rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread Esteban Aliverti
As far as I remember, there were some fixes around compilation time for
edge cases in 5.4. Could you please give a try to 5.4 or even 5.5-SNAPSHOT?

Best Regards,



Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com


On Tue, Jul 24, 2012 at 1:11 PM, Wolfgang Laun wrote:

> On 24/07/2012, fx242  wrote:
> > Hi,
> >
> >  This single
> > rule was taking all the 4h to compile!
> > I'm using DROOLS 5.2 Final.
> > The rule example below samples the problem (don't mind the nonsense
> > Number()
> > conditions):
> >
>
> Well, I do mind the "nonsense Number()". There's no point in
> discussing this if you don't post an exact image of your rule.
>
> -W
> ___
> 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


Re: [rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread fx242

laune wrote
> 
> Well, I do mind the "nonsense Number()". There's no point in
> discussing this if you don't post an exact image of your rule.
> 
> -W
> 

There is a point, because the rule I've posted compiles and causes the same
problem, I've just removed redundant code to expose the problematic section.

TL



--
View this message in context: 
http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018857.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread Wolfgang Laun
On 24/07/2012, fx242  wrote:
> Hi,
>
>  This single
> rule was taking all the 4h to compile!
> I'm using DROOLS 5.2 Final.
> The rule example below samples the problem (don't mind the nonsense
> Number()
> conditions):
>

Well, I do mind the "nonsense Number()". There's no point in
discussing this if you don't post an exact image of your rule.

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


[rules-users] Slow compilation (4h) for a single rule

2012-07-24 Thread fx242
Hi,

Recently I was trying to optimize the rule compilation time for my KB (~4K
rules).
I do a full KB compilation every night, as most of the rules are dynamic
generated/converted and managed by the business operators.
The compile time was not very good (around 3 hours on a 8 core Xeon CPU),
but is was acceptable.
On the other night I was alarmed that the compile time was doubled overnight
without an obvious explanation or any relevant rule count increase. After
some debuging I've traced the problem and was shocked to find that most of
the rules KB (4K rules) compile under 5 minutes, except one. This single
rule was taking all the 4h to compile!
I'm using DROOLS 5.2 Final.
The rule example below samples the problem (don't mind the nonsense Number()
conditions):

rule "CONFIG_1-3UCO07"
salience -90
when
Number(rel_4226982244: intValue)
Number(rel_7521194: intValue)
Number(rel_787633980: intValue)
Number(qty_1331544548: intValue)
Number(rel_1425187049: intValue)
Number(rel_1180441096: intValue)
Number(rel_3132221704: intValue)
Number(rel_1663554156: intValue)
Number(rel_1940612775: intValue)
Number(rel_1735126416: intValue)
Number(rel_3962361266: intValue)
Number(rel_882187: intValue)
Number(rel_1169008280: intValue)
Number(rel_3495503197: intValue)
Number(rel_70290066: intValue)
Number(rel_1333860961: intValue)
Number(rel_2793542368: intValue)
Number(rel_952404632: intValue)
Number(rel_2712335119: intValue)
Number(qty_4276673135: intValue)
Number(qty_3950051097: intValue)
Number(rel_3391032645: intValue)
Number(rel_2738029181: intValue)
Number(qty_4125201080: intValue)
Number(rel_663254919: intValue)
Number(rel_3059142355: intValue)
not((eval(qty_1331544548 == 1) or eval(rel_1425187049 == 1) or
eval(rel_1180441096 == 1) or eval(rel_787633980 >= 1) or eval(rel_7521194 >=
1) or eval(rel_4226982244 >= 1) or eval(rel_2712335119 == 1) or
eval(qty_3950051097 == 1) or eval(qty_4276673135 == 1) or
eval(rel_1940612775 == 1) or eval(rel_3132221704 == 1) or eval(rel_882187 ==
1) or eval(rel_1663554156 == 1) or eval(rel_1735126416 == 1) or
eval(rel_3962361266 == 1) or eval(rel_1169008280 == 1) or
eval(rel_2793542368 == 1) or eval(rel_3495503197 == 1) or
eval(qty_4125201080 == 1) or eval(rel_70290066 == 1) or eval(rel_3391032645
== 1) or eval(rel_1333860961 == 1) or eval(rel_2738029181 == 1) or
eval(rel_663254919 == 1) or eval(rel_952404632 == 1) or eval(rel_3059142355
== 1)))
then
vh.error(kcontext, "Error ...");
end

I've noticed that the last "not(...)" is the problematic condition. Is there
a limit using eval() and or-clauses, or a known problem?

Regards,
Tiago Lopes





--
View this message in context: 
http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Wolfgang Laun
Well, then it's a bug in your code. Do we all agree on this now?

-W


On 24/07/2012, Carolina Pellecchia  wrote:
>>>If there is an insert() call in
>>>org.tass.utils.ExpertSystemManager.java in line 156 then *this* is
>>>where the insert occurs, not the insert() in the rule.
>
> org.tass.utils.ExpertSystemManager.java is our class and the source code is
> this:
>
> 153. *public* *void* insertObservation(String entryPoint,
> Observation obs) {
>
>
> 154. *try* {
>
> 155. *if*(entryPoints.containsKey(entryPoint)) {
>
> 156. entryPoints.get(entryPoint).insert(obs);
>
> 157.
>
> 158. ksession.fireAllRules();
>
> 159. }
>
> 160. }
>
> 161. *catch* (Exception e) {
>
> 162. logger.error(e, e);
>
> 163. }
>
> 164. }
>
>>>Where is org.tass.utils coming from?
>
> Where is org.tass.utils coming from? it is our class.
>
>
>>>It's still a mystery to me how it's possible to have a stack trace
>>>element from NamedEntryPoint.java line 48 - there's no code in this
>>>line.
>
>
> I agree, at the line 48 there isn't code. It would seem that "Drools 5.3.0
> final" has different binary and  source code.
>
>
>>>There is another mystery : why this is working when getting rules from a
> DRL file and not from Guvnor ...
>>>Did you add the POJO model into the Guvnor's package ?
>
>
> Yes, I did.
>
>>>But if this is it, package compilation should raise a compilation error
> ...
>
>
> The package compilation is ok.
>
>
>>>What is sure is that the problem does not comes from the rules, as the
> stack trace shows an "insert" call outside the rules, otherwise there would
> be a >>reteoo...ConsequenceInvocator (something like that) before ..
>
>
> yes, It is sure
>
>
>>>And a last question : is "org.tass.utils.ExpertSystemManager" a class
> from you, or does it take place into another third-party framework (that
> could use a >>different or modified version of drools).
>
>
> org.tass.utils.ExpertSystemManager.java is our class. We aren't using
> third-party
> framework.
>
>
> Thank you
>
> Carolina
>
>
> 2012/7/23 Vincent LEGENDRE 
>
>> There is another mystery : why this is working when getting rules from a
>> DRL file and not from Guvnor ...
>> Did you add the POJO model into the Guvnor's package ?
>> But if this is it, package compilation should raise a compilation error
>> ...
>>
>> What is sure is that the problem does not comes from the rules, as the
>> stack trace shows an "insert" call outside the rules, otherwise there
>> would
>> be a reteoo...ConsequenceInvocator (something like that) before ..
>>
>> And a last question : is "org.tass.utils.ExpertSystemManager" a class
>> from
>> you, or does it take place into another third-party framework (that could
>> use a different or modified version of drools).
>>
>>
>> ___
>> 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


Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Carolina Pellecchia
>>If there is an insert() call in
>>org.tass.utils.ExpertSystemManager.java in line 156 then *this* is
>>where the insert occurs, not the insert() in the rule.

org.tass.utils.ExpertSystemManager.java is our class and the source code is
this:

153. *public* *void* insertObservation(String entryPoint,
Observation obs) {


154. *try* {

155. *if*(entryPoints.containsKey(entryPoint)) {

156. entryPoints.get(entryPoint).insert(obs);

157.

158. ksession.fireAllRules();

159. }

160. }

161. *catch* (Exception e) {

162. logger.error(e, e);

163. }

164. }

>>Where is org.tass.utils coming from?

Where is org.tass.utils coming from? it is our class.


>>It's still a mystery to me how it's possible to have a stack trace
>>element from NamedEntryPoint.java line 48 - there's no code in this
>>line.


I agree, at the line 48 there isn't code. It would seem that "Drools 5.3.0
final" has different binary and  source code.


>>There is another mystery : why this is working when getting rules from a
DRL file and not from Guvnor ...
>>Did you add the POJO model into the Guvnor's package ?


Yes, I did.

>>But if this is it, package compilation should raise a compilation error
...


The package compilation is ok.


>>What is sure is that the problem does not comes from the rules, as the
stack trace shows an "insert" call outside the rules, otherwise there would
be a >>reteoo...ConsequenceInvocator (something like that) before ..


yes, It is sure


>>And a last question : is "org.tass.utils.ExpertSystemManager" a class
from you, or does it take place into another third-party framework (that
could use a >>different or modified version of drools).


org.tass.utils.ExpertSystemManager.java is our class. We aren't using
third-party
framework.


Thank you

Carolina


2012/7/23 Vincent LEGENDRE 

> There is another mystery : why this is working when getting rules from a
> DRL file and not from Guvnor ...
> Did you add the POJO model into the Guvnor's package ?
> But if this is it, package compilation should raise a compilation error ...
>
> What is sure is that the problem does not comes from the rules, as the
> stack trace shows an "insert" call outside the rules, otherwise there would
> be a reteoo...ConsequenceInvocator (something like that) before ..
>
> And a last question : is "org.tass.utils.ExpertSystemManager" a class from
> you, or does it take place into another third-party framework (that could
> use a different or modified version of drools).
>
>
> ___
> 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