[rules-users] how to fire a subset of rules in KB?

2010-06-07 Thread wenjinchao
Hi all, I'm a newbie for drools. And i want to know how to fire a subset of rules in KB, suppose there are three rules named A,B,C, and I want to fire rule A only. by the way, suppose there is a drl file containing rule, and i have set up KB, and call fireAllRules through statefulKnowledgeSe

Re: [rules-users] how to fire a subset of rules in KB?

2010-06-07 Thread PAYET, Manuel
If you want to fire only a subset of rule, you can use ruleflow-group, and you have to use Agenda to define the ruleflow-group to use. You'll find more infos in the drools-expert documentation on how to use those two. De : rules-users-boun...@lists.jboss.org [ma

Re: [rules-users] Error Loading Multiple Input Files

2010-06-07 Thread Fnu Mahalakshmi
Hi Greg, I have my input files inside the src directory of my eclipse project. I am passing the files as follows: private static final String DATA_INPUT_FILE = new String []{ "Input1.txt", "Input2.txt"}; private static final String DATA_OUTPUT_FILE = "Output.1.txt"; private static final String

Re: [rules-users] Error Loading Multiple Input Files

2010-06-07 Thread Swindells, Thomas
This isn't really a Drools question just a basic java programming question. You are trying to read your input files from the current working directory (which defaults to the root of your project in eclipse). What you probably want to be doing is reading your files from the classpath instead. Usi

Re: [rules-users] Error Loading Multiple Input Files

2010-06-07 Thread Esteban Aliverti
The code you pasted doesn't even compile. The first line is wrong. It looks to me that the problem you are experiencing has nothing to do with drools itself. You can't even open the input file using a simple FileReader... No drools api involved there. Make sure you have your inputs files in the rig

Re: [rules-users] Error Loading Multiple Input Files

2010-06-07 Thread Giovanni Motta
Not a drools question, i guess... If the files are in the src directory, you probably have to configure them including the path (e.g. "src/Input1.txt"). When running a java class / junit, eclipse sets the project directory as the current directory, so if you want to reach a file, you must supply th

Re: [rules-users] Error Loading Input Files.

2010-06-07 Thread Fnu Mahalakshmi
he message, and please delete it from your system. Thank you. NYSE Euronext. -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100607/cb3ee90b/attachment-0001.html -- Message: 2

Re: [rules-users] Exception using persistence

2010-06-07 Thread Robert
Hi, still struggling with this one (see below), but I did a slide change in the test-code try { val env = new java.util.Hashtable[String, String] env.put(Context.INITIAL_CONTEXT_FACTORY, "bitronix.tm.jndi.BitronixInitialContextFactory") val ctx = new InitialContext(en

Re: [rules-users] Exception using persistence

2010-06-07 Thread PAYET, Manuel
It's probably that your transaction manager, for an odd reason, doesn't bind with the good name; You can do the following workaround: Final InitialContext initContext = new InitialContext(); initContext.bind("java:comp/UserTransaction",initContext.lookup("comp/UserTransaction")); And voila, thos

Re: [rules-users] Error Loading Input Files.

2010-06-07 Thread Greg Barton
cipient, or an employee or > agent responsible for delivering this message to the > intended recipient, you are hereby notified that any > dissemination, distribution or copying of this communication > is strictly prohibited.  If you have received this > communication in error, please

Re: [rules-users] Error Loading Input Files

2010-06-07 Thread Fnu Mahalakshmi
otify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext. -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100607/cb3ee90b/attachment-0001.html

Re: [rules-users] rules-users Digest, Vol 43, Issue 27

2010-06-07 Thread amit bhardwaj
disclosure. If the reader of > > this message is not the intended recipient, or an employee or agent > > responsible for delivering this message to the intended recipient, you > are > > hereby notified that any dissemination, distribution or copying of this > > communication is

Re: [rules-users] Exception using persistence

2010-06-07 Thread Robert
Thanks Manuel, but the problem is that I do not have any influence on JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env ) where the problem occurs. Looks like Drools is using "java:comp/UserTransaction" internally (within JPAKnowledgeService.newStatefulKnowledgeSession), not

Re: [rules-users] Exception using persistence

2010-06-07 Thread Robert
For additional information: JPAKnowledgeService.newStatefulKnowledgeSession uses org.drools.persistence.session.SingleSessionCommandService where "java:comp/UserTransaction" is used (I checked the drools source code). Looks like there is no way to change this. I just wonder that I am the only

[rules-users] Multiple Object Referencing problem

2010-06-07 Thread Fnu Mahalakshmi
Hi, I am trying out this example from the book : public class Room { private String name // getter and setter methods here } public classs Sprinkler { private Room room; private boolean on; // getter and setter methods here } public class Fire { private Room room

Re: [rules-users] Multiple Object Referencing problem

2010-06-07 Thread David Sinclair
This has nothing to do with Drools. It looks like you are giving Writer bad input perhaps?? Exception in thread "main" *java.lang.NullPointerException* at java.io.Writer.write(Unknown Source) at com.org.RulesTest.main(*RulesTest.java:58*) 2010/6/7 Fnu Mahalakshmi > Hi, > > > >

Re: [rules-users] Multiple Object Referencing error

2010-06-07 Thread Fnu Mahalakshmi
I am writing rule " if fire exists in room start sprinkler" { so if f1 and r1 in this case: I should get s1, r1 } when Fire($room : room) $sprinkler : Sprinkler( room == $room, modified == false ) Then $sprinkler.setmodified(true); modify( $sprinkler ) { setSp

[rules-users] Fusion: Group By

2010-06-07 Thread Andreas Bauer
Hi, I was wondering how you can achieve a "group by" like this select tickDataFeed, stddev(price) from StockTickEvent(symbol='IBM').win:length(10) where volume > 1000 group by tickDataFeed having stddev(price) > 0.8 I thought of using accumulate or collect, but I'm not sure of the exact syntax

Re: [rules-users] Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node

2010-06-07 Thread Vijay K Pandey
I created a sample project to run a very simple rule flow (BPMN process), I got the similar error which the plugin is reporting. My env is SUN JDK 6. Here is the exception I get? Any clue guys. Exception in thread "main" java.lang.Error: Unresolved compilation problems: The method getTex