Re: [rules-users] How can I know, how many facts are processed by stateFulSession?

2010-09-01 Thread tom ska
Hello,
I think you understood me. Your solution is to validate facts in the rule.
OK - I think this is a good idea, but... What if rules are created by no-IT
(no-Math-aware ;) ) people? I can imagine situation where they do not
validate this issue (div by 0). What then? If I send 1000 facts to ksession,
and 901 has value set to 0? I want my 900 correct facts back. How can I
know, how many have been processed?

P.S. I don't want to use globals to count this.

Thanks,
tom.

2010/8/31 Edson Tirelli tire...@post.com

I am not sure I understand your problem. The rule clearly should NOT
 match facts with value 0, as it will raise division by zero error all the
 time. So, the solution, in my mind is:

 rule r1
 when
 p : CTestObj( value != 0 )

 then
 p.setValue( 1 / p.getValue() );
 end

If you need to give a different treatment to objects with value == 0,
 just add another rule for them.

[]s
Edson


 2010/8/31 tom ska tiberium.li...@gmail.com

 Hello,
 I have a class and rule:

 class CTestObj
 {
 private double value;

 void setValue(double v) {
 this.value = v;
 }

 double getValue() {
 return this.value;
 }
 }

 rule r1
 when
 p : CTestObj
 then
 p.setValue( 1 / p.getValue() );
 end

 As you can see, in this rule, there is risk, to put into stateFulSession
 object with value set 0. I can't validate this, because, this problem has a
 variation where I put into stateFulSession object with set no 0, but the
 rule will modify it...
 So - I can't validate this = fact with value 0 is correct.

 But I process with stateFulSession many, many facts... For example 1000.
 And, after 900 facts it occurs, that fact number 901 has value set on 0. In
 effect I get an exception:  org.drools.runtime.rule.ConsequenceException:
 java.lang.ArithmeticException: / by zero. And ksession stops processing
 facts. But, 900 facts are processed! I don't want to process them second
 time.
 And this is my question:

 How can I know, which fact is first no-processed fact? Which one stoped
 fireAllRules method?
 Beacuse I don't want to process them another time.

 Greetings :)
 tom.





 ___
 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


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


Re: [rules-users] Getting rule's body to application.

2010-09-01 Thread tom

Hi,
I want to ask for another thing connected to my question: am I to use Apache
Jackrabbit to solve my problem? I want to get rules body (CONDITION, ACTION,
globals definition...) but in Drools I see only classes which contains only
rule's name and rule's package.

Guvnor does it somehow. As far as I know, it uses Jackrabbit. Is this the
only one method?

Thanks,
tom.
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Getting-rule-s-body-to-application-tp1393181p1398650.html
Sent from the Drools - User 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] copyright violation issue on Drools

2010-09-01 Thread Mark Proctor

 On 01/09/2010 02:27, 山本 裕介 wrote:

Richard's answer was:
- I am actually currently on PTO but will get back to you as soon as 
practicable when I return.(Aug 21)
- We will not be removing those changes. Please do not continue asking about 
this matter.(Aug 31)

Yusuke Yamamoto,

A mailing list is not the right place to raise legal questions, there 
won't be many lawyers on here. I made my own opinion on how OSS 
licensing works very clear and the need for certainty. If you think I'm 
wrong then go through the Red Hat legal department and i'll obide by 
their decision.


Whatever your dispute is with Red Hat, don't take it out by needlessly 
harrasing my community and throwing your toys out of the pram; it won't 
achieve anything other than to make yourself look like a very troubled 
individual.


I've been as polite as I can, but you've harassed us on irc recently, 
despite me politely pleeding with you to leave and then decided to paste 
your own stupidity (irc log) into jira https://jira.jboss.org/o 
browse/JBRULES-2660. Now your pasting private conversations into public 
forums on a topic that no one on here cares about.


If you think your grievances are real and not achieving satisfaction 
directly with the Red Hat legal department,  then seek legal council and 
do it through the proper channels, otherwise STFU.


My guess is you are hoping to achieve your spiteful aims by being a 
bully and publicly harassing Red Hat communities and trying to publicly 
embarass Red Hat, your former employer. Unfortunately, for you, the only 
thing you are achieving is leaving a trail of google search results for 
your future employers to find, that will be on the internet FOREVER. Do 
you want them to form their opinion of youself from this thread?


So do yourself and your career a favour, take a holiday, go relax and 
put this behind you. Move forward with your life as you won't achieve 
anything positive going going down this route.


I think it's at times like this we can all learn a thing or two from 
Grand Master Yoda - Fear is the path to the dark side. Fear leads to 
anger. Anger leads to hate. Hate leads to suffering.


Mark

PS. My advice is for you not to reply to this, and let this thread die 
here, nothing positive for you can be achieved.

That's why I post this matter to this list.

On Sep 1, 2010, at 6:19 AM, Mark Proctor wrote:


Because this is a legal matter no one in my team can do anything or discuss 
anything with you, we've been instructed that everything must go through RHT 
legal. Please discuss this directly with Richard Fontana: rfont...@redhat.com

Mark


On 31/08/2010 17:41, 山本 裕介 wrote:

I have consulted RH legal dept. only to get no meaningful response.
I guess Edson is the one who commit most of these files.
The how and why they need to be uncommitted is attached to the Jira issue.

Thanks,
Yusuke

On Sep 1, 2010, at 1:34 AM, Mauricio Salatino wrote:


Hi Yusuke, good question. I'm not sure where is the right place, but you are 
only asking to rollback your changes right?
who commit all your contributions to the jboss repo?
I also saw that you mention: For several reasons, I decided to withdraw those 
contributions introduced from my spare time. 
can you mention those reasons? so we, as community can learn why you want to 
remove your contributions. I'm just curious.
Greetings.


On Tue, Aug 31, 2010 at 12:50 PM, 山本 裕介yamam...@gmail.com  wrote:
Where is the appropriate forum for copyright issues?

On Sep 1, 2010, at 12:45 AM, Greg Barton wrote:


This is not the appropriate forum for copyrighgt issues.

GreG

On Aug 31, 2010, at 9:40, 山本 裕介yamam...@gmail.com  wrote:

Hi,

There's a copyright violation issue on Drools 5.1 release.
Please remove the changes listed in the following issue.
https://jira.jboss.org/browse/JBRULES-2660

Thanks,
Yusuke
___
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



--
  - CTO @ http://www.plugtree.com
  - MyJourney @ http://salaboy.wordpress.com
  - Co-Founder @ http://www.jbug.com.ar

  - Salatino Salaboy Mauricio -
___
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] Archived documentation for Drools 3?

2010-09-01 Thread Alexandros Karypidis
  Hi all,

The Drools web site only has the docs/tutorials/etc for version 4 
onwards. I am looking for archived documentation of Drools version 3.x.y 
(I am new to Drools and need to work on a legacy application written 
with that version). Does anyone happen to have it?

Kind regards,
Alexandros

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


Re: [rules-users] Archived documentation for Drools 3?

2010-09-01 Thread Mark Proctor
  On 01/09/2010 08:52, Alexandros Karypidis wrote:
Hi all,

 The Drools web site only has the docs/tutorials/etc for version 4
 onwards. I am looking for archived documentation of Drools version 3.x.y
 (I am new to Drools and need to work on a legacy application written
 with that version). Does anyone happen to have it?

 Kind regards,
 Alexandros
You should be able to build the docs from here:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/tags/3.0.6-GA/

Mark
 ___
 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] Grouping of rules in Guvnor GUI

2010-09-01 Thread Swapnil Sawant
Hi,


How can I achieve grouping of rules through Guvnor GUI ?

For example,

Lets say I have created Rule 1 , Rule 2 , Rule 3 and Rule 4 by using Guvnor 
GUI only.

Now , I want to group Rule 1 and 2 in RuleGrp1 and Rule 3 and 4 in RuleGrp2 
using Guvnor GUI only.


I have heard about agenda-group in DRL files. But , I don't wish to write 
this attribute in DRL files(in other words,I want to avoid writing DRL file 
manually) and then run the RuleGroup.

I want this whole process of creating and grouping of rules to be done only 
using Guvnor , so that I can point to the resulting binary package URL 
directly in my changeset.xml and start firing rules in my application.

Can any one pl help me in finding how to achieve this ?


Thanks  Regards,
Swapnil Sawant


This Email may contain confidential or privileged information for the intended 
recipient (s) If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system.

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


Re: [rules-users] Grouping of rules in Guvnor GUI

2010-09-01 Thread Swindells, Thomas
What are you hoping to achieve by these groups of rules?

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Swapnil Sawant
Sent: 01 September 2010 09:16
To: rules-users@lists.jboss.org
Subject: [rules-users] Grouping of rules in Guvnor GUI

Hi,


How can I achieve grouping of rules through Guvnor GUI ?

For example,

Lets say I have created Rule 1 , Rule 2 , Rule 3 and Rule 4 by using Guvnor 
GUI only.

Now , I want to group Rule 1 and 2 in RuleGrp1 and Rule 3 and 4 in RuleGrp2 
using Guvnor GUI only.


I have heard about agenda-group in DRL files. But , I don't wish to write 
this attribute in DRL files(in other words,I want to avoid writing DRL file 
manually) and then run the RuleGroup.

I want this whole process of creating and grouping of rules to be done only 
using Guvnor , so that I can point to the resulting binary package URL 
directly in my changeset.xml and start firing rules in my application.

Can any one pl help me in finding how to achieve this ?


Thanks  Regards,
Swapnil Sawant


This Email may contain confidential or privileged information for the intended 
recipient (s) If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system.

__



**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Persistence.createEntityManagerFactory NullPointerException

2010-09-01 Thread 亮亮
hi:

in my webapp, I use JPA to store the runtime state,i use this code in
VdcService.java which is a sample  java class:

EntityManagerFactory emf =Persistence.createEntityManagerFactory(
org.drools.persistence.jpa );
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );

 // create a new knowledge session that uses JPA to store the runtime state
StatefulKnowledgeSession ksession =
JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );

I put persistence.xml to webRoot/META-INF/  , persistence.xml:

?xml version=1.0 encoding=UTF-8 standalone=yes?
persistence
version=1.0
xsi:schemaLocation=
http://java.sun.com/xml/ns/persistence
 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
 http://java.sun.com/xml/ns/persistence/orm
 http://java.sun.com/xml/ns/persistence/orm_1_0.xsd;
xmlns:orm=http://java.sun.com/xml/ns/persistence/orm;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://java.sun.com/xml/ns/persistence;

persistence-unit name=org.drools.persistence.jpa
transaction-type=JTA
providerorg.hibernate.ejb.HibernatePersistence/provider
jta-data-sourcejava:comp/env/jdbc/mysql/jta-data-source
classorg.drools.persistence.session.SessionInfo/class
 classorg.drools.persistence.processinstance.ProcessInstanceInfo/class

classorg.drools.persistence.processinstance.ProcessInstanceEventInfo/class
classorg.drools.persistence.processinstance.WorkItemInfo/class


properties
property name=hibernate.dialect
value=org.hibernate.dialect.MySQLDialect/
property name=hibernate.max_fetch_depth value=3/
property name=hibernate.hbm2ddl.auto value=create /
property name=hibernate.show_sql value=true /
property name=hibernate.transaction.manager_lookup_class
value=org.hibernate.transaction.BTMTransactionManagerLookup /
/properties
/persistence-unit

/persistence

I use resin 3.1.10,  $resin-home/conf/resin.conf:

   database
   jndi-namejdbc/mysql/jndi-name
   driver type=org.gjt.mm.mysql.Driver
 urljdbc:mysql://127.0.0.1:3306/test/url
 userroot/user
 password/password
/driver
prepared-statement-cache-size8/prepared-statement-cache-size
max-connections20/max-connections
max-idle-time30s/max-idle-time
  /database

when i run this webapp , i got this exception:

java.lang.NullPointerException
at
com.caucho.amber.manager.AmberPersistenceProvider.createEntityManagerFactory(AmberPersistenceProvider.java:65)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69)
at com.abc.abc.service.VdcService.exec(VdcService.java:32)
at com.abc.abc.resources.Apply.apply(Apply.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:156)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:208)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:75)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:115)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:67)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:724)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:689)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:680)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:324)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:604)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
at
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:416)
at
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at

Re: [rules-users] Grouping of rules in Guvnor GUI

2010-09-01 Thread Swapnil Sawant

I have created certain rules in Guvnor. Now , I want to group them into
different groups say grp1,grp2 etc

And then, depending upon input from my application(via fact type) as I wish
to fire rules from a particular Rule Group(or you can say fire that
particular Rule Group).

And I wish to achieve this grouping via Guvnor GUI and not by writing DRL
files(i.e. by explicitly writing agenda-group in DRL) as I have rules in
place which I have created using Guvnor GUI.


Thanks,

Swapnil Sawant

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Grouping-of-rules-in-Guvnor-GUI-tp1398919p1399077.html
Sent from the Drools - User 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] Problem with importing DrlParser and XmlDumper classes.

2010-09-01 Thread tom ska
Hi,
I have problem with importing and using DrlParser  XmlDumper classes. In
Eclipse I get thoose communicate:
Discouraged access: The type DrlParser is not accessible due to restriction
on required library [path hier]\drools-compiler.jar

I googled this problem (maybe not too long) but I haven't found a solution.
I want to mark, that my Eclipse configuration is correct - I don't get
error, but only warning. But this is annoying :) I tried to look in docs,
but Drools 5.1 has no javadocs, and in Drools 5.0.'s javadocs there are no
DrlParser and XmlDumper classes! Why? (In Drools 5.1. Expert User Guide
4.11.4 is written that Drools 5.1. uses those classes). I don't understand
what's going on :)

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


Re: [rules-users] How can I know, how many facts are processed by stateFulSession?

2010-09-01 Thread Wolfgang Laun
A simple experiment would show you that calling fireUntilHalt() again,
after an exception occurs (in some RHS code) will simply continue with
processing what's left on the agenda.

Of course,  the RHS code that throws the exception has only executed
partially, which could easily leave your system in an inconsistent state.

In order to determine which rule and which fact(s), you'd have to
activate event handling and to log the current activation in the
exception handler surrounding fireUntilHalt().

-W


2010/9/1 tom ska tiberium.li...@gmail.com:
 Hello,
 I think you understood me. Your solution is to validate facts in the rule.
 OK - I think this is a good idea, but... What if rules are created by no-IT
 (no-Math-aware ;) ) people? I can imagine situation where they do not
 validate this issue (div by 0). What then? If I send 1000 facts to ksession,
 and 901 has value set to 0? I want my 900 correct facts back. How can I
 know, how many have been processed?

 P.S. I don't want to use globals to count this.

 Thanks,
 tom.

 2010/8/31 Edson Tirelli tire...@post.com

    I am not sure I understand your problem. The rule clearly should NOT
 match facts with value 0, as it will raise division by zero error all the
 time. So, the solution, in my mind is:
 rule r1
     when
         p : CTestObj( value != 0 )
     then
         p.setValue( 1 / p.getValue() );
 end

    If you need to give a different treatment to objects with value == 0,
 just add another rule for them.
    []s
    Edson

 2010/8/31 tom ska tiberium.li...@gmail.com

 Hello,
 I have a class and rule:

 class CTestObj
 {
     private double value;

     void setValue(double v) {
     this.value = v;
     }

     double getValue() {
     return this.value;
     }
 }

 rule r1
     when
         p : CTestObj
     then
         p.setValue( 1 / p.getValue() );
 end

 As you can see, in this rule, there is risk, to put into stateFulSession
 object with value set 0. I can't validate this, because, this problem has a
 variation where I put into stateFulSession object with set no 0, but the
 rule will modify it...
 So - I can't validate this = fact with value 0 is correct.

 But I process with stateFulSession many, many facts... For example 1000.
 And, after 900 facts it occurs, that fact number 901 has value set on 0. In
 effect I get an exception:  org.drools.runtime.rule.ConsequenceException:
 java.lang.ArithmeticException: / by zero. And ksession stops processing
 facts. But, 900 facts are processed! I don't want to process them second
 time.
 And this is my question:

 How can I know, which fact is first no-processed fact? Which one stoped
 fireAllRules method?
 Beacuse I don't want to process them another time.

 Greetings :)
 tom.





 ___
 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



 ___
 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] Problem with importing DrlParser and XmlDumper classes.

2010-09-01 Thread Mark Proctor

 On 01/09/2010 10:07, tom ska wrote:

Hi,
I have problem with importing and using DrlParser  XmlDumper classes. 
In Eclipse I get thoose communicate:
Discouraged access: The type DrlParser is not accessible due to 
restriction on required library [path hier]\drools-compiler.jar


I googled this problem (maybe not too long) but I haven't found a 
solution. I want to mark, that my Eclipse configuration is correct - I 
don't get error, but only warning. But this is annoying :) I tried to 
look in docs, but Drools 5.1 has no javadocs, and in Drools 5.0.'s 
javadocs there are no DrlParser and XmlDumper classes! Why? (In Drools 
5.1. Expert User Guide 4.11.4 is written that Drools 5.1. uses those 
classes). I don't understand what's going on :)
The XML stuff is unmaintained, so few people used it and it was a lot of 
work to do. Further more rather than pushing our own XML, we are waiting 
on RuleML and will hopefully adopt that as the default xml storage format.


Tehre are Drools 5.1 docs. DrlParer and XmlDumper are considered 
internal classes and as such don't get published in the main javadocs, 
which is restrictied to drools-api. This allows us to provide a clear 
delineation on what is supported and unlikely to change and what is 
likely to change.

http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/javadocs/index.html

Mark


Greetings,
tom.


___
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] Please ignore Yusuke Yamamoto do not reply (don't feed the troll)

2010-09-01 Thread Mark Proctor
  It is unfortunate that in Open Source from time to time we have to 
deal with people of a more unstable nature, the inveritable troll. see 
http://drools-java-rules-engine.46999.n3.nabble.com/Re-rules-users-copyright-violation-issue-on-Drools-td1397208.html#a1397208
 


Anyway please don't feed the troll :)
http://www.collegehumor.com/video:1926079

Mark

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


Re: [rules-users] Getting rule's body to application.

2010-09-01 Thread Esteban Aliverti
I'm not sure if you can decompile a rule to get its sources. When you are
using your rules, you are working with a binary representation of them. The
RETE algorithm doesn't know anything about the source code.
Guvnor uses another language to express rules (when you create them using
the guided editor), which is BRL. This is an xml representation of a rule.
Guvnor maintain the rules in BRL syntax in Jackrabbit repository. When
Guvnor compiles your package, the BRL is translated to DRL and then compiled
to PKG. But once the rule is compiled you can't go back.
If you have the DRL available, you can use the rule name from the
ConsequenceException to search for the source in the DRL. That is all I can
imagine. Maybe someone else have a better solution.

Best,



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


On Wed, Sep 1, 2010 at 3:49 AM, tom tiberium.li...@gmail.com wrote:


 Hi,
 I want to ask for another thing connected to my question: am I to use
 Apache
 Jackrabbit to solve my problem? I want to get rules body (CONDITION,
 ACTION,
 globals definition...) but in Drools I see only classes which contains only
 rule's name and rule's package.

 Guvnor does it somehow. As far as I know, it uses Jackrabbit. Is this the
 only one method?

 Thanks,
 tom.
 --
 View this message in context:
 http://drools-java-rules-engine.46999.n3.nabble.com/Getting-rule-s-body-to-application-tp1393181p1398650.html
 Sent from the Drools - User 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] Persistence.createEntityManagerFactory NullPointerException

2010-09-01 Thread Esteban Aliverti
As far as I can see, this has nothing to do with drools. You can't even
create the EntityManagerFactory. Try to set a finest log level for
com.caucho.amber.*
and org.hibernate.* to see why it is throwing a NPE.

Best,



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


2010/9/1 亮亮 zhuyx...@gmail.com

 hi:

 in my webapp, I use JPA to store the runtime state,i use this code in
 VdcService.java which is a sample  java class:

 EntityManagerFactory emf =Persistence.createEntityManagerFactory(
 org.drools.persistence.jpa );
 Environment env = KnowledgeBaseFactory.newEnvironment();
 env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );

  // create a new knowledge session that uses JPA to store the runtime state
 StatefulKnowledgeSession ksession =
 JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );

 I put persistence.xml to webRoot/META-INF/  , persistence.xml:

 ?xml version=1.0 encoding=UTF-8 standalone=yes?
 persistence
 version=1.0
 xsi:schemaLocation=
 http://java.sun.com/xml/ns/persistence
  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
  http://java.sun.com/xml/ns/persistence/orm
  http://java.sun.com/xml/ns/persistence/orm_1_0.xsd;
 xmlns:orm=http://java.sun.com/xml/ns/persistence/orm;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns=http://java.sun.com/xml/ns/persistence;

 persistence-unit name=org.drools.persistence.jpa
 transaction-type=JTA
 providerorg.hibernate.ejb.HibernatePersistence/provider
 jta-data-sourcejava:comp/env/jdbc/mysql/jta-data-source
 classorg.drools.persistence.session.SessionInfo/class
  classorg.drools.persistence.processinstance.ProcessInstanceInfo/class

 classorg.drools.persistence.processinstance.ProcessInstanceEventInfo/class
 classorg.drools.persistence.processinstance.WorkItemInfo/class


 properties
 property name=hibernate.dialect
 value=org.hibernate.dialect.MySQLDialect/
 property name=hibernate.max_fetch_depth value=3/
 property name=hibernate.hbm2ddl.auto value=create /
 property name=hibernate.show_sql value=true /
 property name=hibernate.transaction.manager_lookup_class
 value=org.hibernate.transaction.BTMTransactionManagerLookup /
 /properties
 /persistence-unit

 /persistence

 I use resin 3.1.10,  $resin-home/conf/resin.conf:

database
jndi-namejdbc/mysql/jndi-name
driver type=org.gjt.mm.mysql.Driver
  urljdbc:mysql://127.0.0.1:3306/test/url
  userroot/user
  password/password
 /driver

 prepared-statement-cache-size8/prepared-statement-cache-size
 max-connections20/max-connections
 max-idle-time30s/max-idle-time
   /database

 when i run this webapp , i got this exception:

 java.lang.NullPointerException
 at
 com.caucho.amber.manager.AmberPersistenceProvider.createEntityManagerFactory(AmberPersistenceProvider.java:65)
 at
 javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69)
 at com.abc.abc.service.VdcService.exec(VdcService.java:32)
 at com.abc.abc.resources.Apply.apply(Apply.java:55)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:156)
 at
 com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
 at
 com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:208)
 at
 com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:75)
 at
 com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:115)
 at
 com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:67)
 at
 com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:724)
 at
 com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:689)
 at
 com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:680)
 at
 com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:324)
 at
 com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425)
 at
 com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:604)
 at 

Re: [rules-users] Grouping of rules in Guvnor GUI

2010-09-01 Thread Esteban Aliverti
If rules in different groups are unrelated with each other, you can write
them in different packages or build them in different snapshots using custom
Selectors. Then, according to the user input, you can create your kbase
using just the packages/snapshots you need.
If you don't want to create a kbase over and over again, you can create some
kind of cache.
If the agenda-group solution works for you, but you don't want to modify the
generated DRLs, you still can use the Guided Editor (if that is what you
call Guvnor UI) to set this attribute to your rules using the show
options... link at the bottom of each rule.

Best,




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


On Wed, Sep 1, 2010 at 5:54 AM, Swapnil Sawant 
swapnil.saw...@lntinfotech.com wrote:


 I have created certain rules in Guvnor. Now , I want to group them into
 different groups say grp1,grp2 etc

 And then, depending upon input from my application(via fact type) as I wish
 to fire rules from a particular Rule Group(or you can say fire that
 particular Rule Group).

 And I wish to achieve this grouping via Guvnor GUI and not by writing DRL
 files(i.e. by explicitly writing agenda-group in DRL) as I have rules in
 place which I have created using Guvnor GUI.


 Thanks,

 Swapnil Sawant

 --
 View this message in context:
 http://drools-java-rules-engine.46999.n3.nabble.com/Grouping-of-rules-in-Guvnor-GUI-tp1398919p1399077.html
 Sent from the Drools - User 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] Drools Flow - Session objects

2010-09-01 Thread jawa

Hi,

I am writing a small drools flow app. My flow starts off with a RuleGroup
node then I've two User Task nodes. What i do is this:

StatefulKnowledgeSession session =
JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null,
environment);
WorkItemManager manager = session.getWorkItemManager();
manager.registerWorkItemHandler(Human Task, new MyWorkItemHandler(false));
MyVO vo = new MyVO();
vo.setComment(These are comments !!);
session.insert(vo);
ProcessInstance processInstance = session.startProcess(pocflow, null);
session.fireAllRules(); 
session.dispose();

As you can see i am inserting an object of type MyVO into the knowledge base
session. I am using JPA to store my flow in db. Now when I execute this
code, it starts my flow then calls my drl file for RuleGroup node then calls
human tasks etc. In my drl file I've this code:

package mypackage
import net.plus.kbd.poc.MyVO;

rule Displaycomments
ruleflow-group display_comments
when $vo: MyVO()
then 
System.out.println(Inside Rule-MyVoComments- + 
$vo.getComment());
end
rule NotDisplaycomments
ruleflow-group display_comments
when not $v: MyVO()
then 
System.out.println(Inside Rule-MyVoComments not found);
end

So when this rule gets executed it always run NotDisplaycomments rule and
prints out that MyVoComments not found. As far as I know it should find my
vo which i inserted into the session. isn't it?

I am using drools 5.1.1 on jboss 5.

Any idea what am I doing wrong?

Thanks

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Session-objects-tp1400891p1400891.html
Sent from the Drools - User 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] where to find version 4.2.2GA in svn?

2010-09-01 Thread Alex . Porras
Hello,

I purchased a copy of Paul Browne's JBoss Drools Business Rules, and am 
trying to learn Guvnor via the book's examples.  However, they are written 
for use in drools 4.2.2GA and seem to be incompatible with version 5.1. 
So, I am going the download and build source route.  Browsing the SVN 
tree, this seems to be the closest tag to a 4.2.2GA version I could 
find.

http://anonsvn.jboss.org/repos/labs/labs/jbossrules/tags/DROOLS_SOA_4_2_18483_GA/
 


Could someone be so kind as to confirm whether this is the correct tag for 
that release, or point me in the right direction?

Regards,

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


[rules-users] concurrent execution for the first time thorws error

2010-09-01 Thread Sudhir M
Hi,

In our application we have different rulesets which we load them on
demand and cache them (knowledge base) for the sub-sequent requests.

For the first time before caching if we hit the server concurrently we
are getting the following exception which is not very clear.

I assume knowledge bases are thread safe and we can create multiple
stateful sessions using the same knowledege base.

we are using drools 5.1 final release.

java.lang.IllegalArgumentException: org.drools.process.instance.impl
at java.lang.ClassLoader.definePackage(ClassLoader.java:1452)
at java.net.URLClassLoader.definePackage(URLClassLoader.java:348)
at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1781)
at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at 
org.drools.SessionConfiguration.initProcessInstanceManagerFactory(SessionConfiguration.java:302)
at 
org.drools.SessionConfiguration.getProcessInstanceManagerFactory(SessionConfiguration.java:291)
at 
org.drools.common.AbstractWorkingMemory.init(AbstractWorkingMemory.java:367)
at 
org.drools.common.AbstractWorkingMemory.init(AbstractWorkingMemory.java:295)
at 
org.drools.common.AbstractWorkingMemory.init(AbstractWorkingMemory.java:259)
at 
org.drools.reteoo.ReteooWorkingMemory.init(ReteooWorkingMemory.java:96)
at 
org.drools.reteoo.ReteooStatefulSession.init(ReteooStatefulSession.java:80)
at 
org.drools.reteoo.ReteooRuleBase.newStatefulSession(ReteooRuleBase.java:386)
at 
org.drools.reteoo.ReteooRuleBase.newStatefulSession(ReteooRuleBase.java:371)
at 
org.drools.impl.KnowledgeBaseImpl.newStatefulKnowledgeSession(KnowledgeBaseImpl.java:172)
at 
org.drools.impl.KnowledgeBaseImpl.newStatefulKnowledgeSession(KnowledgeBaseImpl.java:155)

Please help us in this regard.

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


Re: [rules-users] I'd like to get Drools 5.0

2010-09-01 Thread ttakeaki

To:salaboy

Thanks!

I'll try to build them!

Thank's a lot for your information.
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/I-d-like-to-get-Drools-5-0-tp1395402p1401124.html
Sent from the Drools - User 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] I'd like to get Drools 5.0

2010-09-01 Thread Salaboy
If you have problems, let us know! 


- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Mauricio Salaboy Salatino -

On 01/09/2010, at 12:47, ttakeaki t.take...@gmail.com wrote:

 
 To:salaboy
 
 Thanks!
 
 I'll try to build them!
 
 Thank's a lot for your information.
 -- 
 View this message in context: 
 http://drools-java-rules-engine.46999.n3.nabble.com/I-d-like-to-get-Drools-5-0-tp1395402p1401124.html
 Sent from the Drools - User 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] Multiple StatefulKnowledgeSessions at a time?

2010-09-01 Thread skasab2s

Noone ?
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Multiple-StatefulKnowledgeSessions-at-a-time-tp1108161p1401984.html
Sent from the Drools - User 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] Incorrect allowable comparison when using Guvnor GUI Rules - known bug?

2010-09-01 Thread Esteban Aliverti
How did you define your model? Did you upload a Jar? or did you define it in
Guvnor? What is the field's type?



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


2010/8/31 alex.por...@dds.net

 Stephen Mcgruer s0840449 at sms.ed.ac.uk  wrote:

  Now, I want to match on the fooBar's barInt property being *less* *than*a 
  hundred. So, I click on fooBar,
  and choose the 'barInt' subfield. It appears, **BUT** there is no option
 for is greater *than* or is
 * less* *than*, only is equals to and is not equals to!

 I recently downloaded drools 5.1.1 and am experiencing the same issue.
  Anyone else?

 Cheers,

 Alex


 ___
 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] Incorrect allowable comparison when using Guvnor GUI Rules - known bug?

2010-09-01 Thread Alex . Porras
Esteban Aliverti wrote on 09/01/2010 03:05:23 PM:

 How did you define your model? Did you upload a Jar? or did you 
 define it in Guvnor? What is the field's type?

Hi Esteban,

I allowed Guvnor to import the built in samples upon first run, so I 
didn't have to upload any jar files--the rules and models were imported by 
Guvnor itself.  The model is the MortgageModel found in the mortgages 
package, using the Applicant fact.  I originally tried this procedure 
with the creditRating field, which I now see is a text type.  However, 
it does not seem to work with the age field, which is an integer.

Cheers,

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


Re: [rules-users] Incorrect allowable comparison when using Guvnor GUI Rules - known bug?

2010-09-01 Thread Alex . Porras
I should also mention that I entered a Jira defect for this:

https://jira.jboss.org/browse/JBRULES-2680

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


Re: [rules-users] Incorrect allowable comparison when using Guvnor GUI Rules - known bug?

2010-09-01 Thread Esteban Aliverti
Ok, the problem is the expression editor (as you mention in the issue). I
have assigned the issue to myself.
Please start watching this issue (use the watch link) so you will be
notified of the progress.

Best,



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


2010/9/1 alex.por...@dds.net

 I should also mention that I entered a Jira defect for this:

 https://jira.jboss.org/browse/JBRULES-2680

 Alex
 ___
 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] I'd like to get Drools 5.0

2010-09-01 Thread Ansgar Konermann
On 31.08.2010 18:30, Mauricio Salatino wrote:
 probably you can build the old version using some branch.
 http://anonsvn.jboss.org/repos/labs/labs/jbossrules/branches/5.0.x/
No need to build drools yourself, see here:

https://repository.jboss.org/nexus/

It's in the public JBoss maven repo, beneath org.drools... - just where
it belongs.

Direct URL:
https://repository.jboss.org/nexus/content/groups/public/org/drools/

Kind regards

Ansgar



 2010/8/31 多田丈晃 t.take...@gmail.com mailto:t.take...@gmail.com

 Hi,

 Does anyone know where I can get older version Drools archive?

 On my work, I need to use Drools 5.0.
 but In Drools download page only have latest version.

 Please let me know where is older version archive download page.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




 -- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino Salaboy Mauricio -


 ___
 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] RuleFlowProcessFactory - no XML output?

2010-09-01 Thread Jeff Parks
Thanks Vijay,

The Drools 5.1.1 javadocs that I downloaded do not include
XmlRuleFlowProcessDumper, hence the source of my confusion.

 

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Vijay K Pandey
Sent: Tuesday, August 31, 2010 7:46 PM
To: Rules Users List
Subject: Re: [rules-users] RuleFlowProcessFactory - no XML output?

 

Pass your RuleFlowProcess (process) object to following Drools XML dumper
classes to get what you need.

 

String processBPMNXML = XmlRuleFlowProcessDumper.INSTANCE.dump(process);

 

String processRFXML  = XmlBPMNProcessDumper.INSTANCE.dump(process);

 

Will return the XML in BPMN or RuleFlow respectively.

 

Vijay

From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Jeff Parks
Sent: Tuesday, August 31, 2010 6:39 PM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] RuleFlowProcessFactory - no XML output?

 

I should have mentioned that I am using Drools 5.1.1

 

From: Jeff Parks [mailto:jeff.pa...@comcast.net] 
Sent: Tuesday, August 31, 2010 4:33 PM
To: 'rules-users@lists.jboss.org'
Subject: RuleFlowProcessFactory - no XML output?

 

I like the idea of creating a Drools Process via the Process API. It fits my
usage model very well . What surprises me is that I have not seen a way to
take the RuleFlowProcess and create a Process in XML format, which I would
think to be a natural extension. I have to think I am missing something -
can someone share me some code snippet that accomplishes my goal?

 

 

thanks

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


[rules-users] java.lang.RuntimeException: Unable to load session snapshot

2010-09-01 Thread Gustavo Tenrreiro
Hi,

I am using JPA session persistance. Everything is working fine, then a
rule fires that detects an Event, and after that trying to recreate
the session fails with a:

Caused by: java.lang.RuntimeException: Unable to load session snapshot
at 
org.drools.persistence.session.JPASessionMarshallingHelper.loadSnapshot(JPASessionMarshallingHelper.java:96)

Can anyone help me with this ?

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


[rules-users] How to modify changeset.xml in guvnor

2010-09-01 Thread rtowler1


I apologize now if this is the wrong forum, I'm a Drools noobie.

I'm trying to get the mortgage example working using jboss 5.0.1GA server
running drools 5.1.1 guvnor.

I get the 401 unauthorized http response, which is due to the 5.1 using
authentication.

I've read the posts about modifying the changeset.xml to include
authentication.

But I cannot see how to change the changeset.xml file from within Guvnor and
although the URL is given to the ChangeSet.xml file, I believe that it's
probably generated on the fly as I cannot find it in the server's
directories.

If someone could point me in the right direction for this I'd appreciate it.
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/How-to-modify-changeset-xml-in-guvnor-tp1404619p1404619.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users