[rules-users] Formula and Predicate example using a condition for Guvnor

2009-03-17 Thread Ravi Krishnamurthy




Hello:
Is there any examples available using the Formula and Predicate
Calculation type for Guvnor.

Thanks
Ravi





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


[rules-users] When is drools 5 released?

2009-03-16 Thread Ravi Krishnamurthy

Hello:
Would like to know when is Drools5 planned to be released.

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


[rules-users] How to use Salience in a decision table

2008-12-16 Thread Ravi Krishnamurthy

Hello:
Can Salience be used in a decision table.

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


Re: [rules-users] Decision table capabilities

2008-12-10 Thread Ravi Krishnamurthy

Thanks David for your time and help.

Any suggestion how to do using Decision Table. Any sample .xls will be 
very helpful.


Regards,
Ravi

David Sinclair wrote:
You could do it a couple of ways. 3 Rules where the whens look like 
the following


when A(Value == 25) then ...
when A(Value == 10) then ...
when A(Value != 10 && != 25) then...

Or with salience and control facts

when
   A(value == 25)
then
  print success;
  insert(new Found());

when
  A(value == 10)
then
  print not bad
  insert(new Found());

salience -10
when
 not (Found())
then
 print try again

On Wed, Dec 10, 2008 at 1:51 AM, Ravi Krishnamurthy <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


Hello:
1) Is it possible to write any if then else kind of rule instead
of stating all the possibilities in a decision table.

For example: if a == 25
   print (success)
 else if a == 10
   print (not bad)
 else
print (try again)

Thanks,
Ravi




___
rules-users mailing list
rules-users@lists.jboss.org <mailto: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] Decision table capabilities

2008-12-10 Thread Ravi Krishnamurthy

Thanks Greg. Hope you will get your spare time soon :)

Anyway I'm a newbie and don't know how to request the dev. Let me know 
how to  make a request and I will do it.


Regards,
Ravi

Greg Barton wrote:

I've wanted this kind of functionality for a while, and if I have a spare month 
some time and the dev team approves I'll build it in. :)  Don't hold your 
breath, though.  If you want it quicker, bug the devs.

--- On Wed, 12/10/08, Sowmya Yellamilli <[EMAIL PROTECTED]> wrote:

  

From: Sowmya Yellamilli <[EMAIL PROTECTED]>
Subject: Re: [rules-users] Decision table capabilities
To: rules-users@lists.jboss.org
Date: Wednesday, December 10, 2008, 1:27 AM
unfortunately not possible
not only decision tables, across all drools implementations

because only 'when -- then' is permitted not
'otherwise'





Ravi Krishnamurthy wrote:


Hello:
1) Is it possible to write any if then else kind of
  

rule instead of


stating all the possibilities in a decision table.

For example: if a == 25
   print (success)
 else if a == 10
   print (not bad)
 else
print (try again)

Thanks,
Ravi



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


  

--
View this message in context:
http://www.nabble.com/Decision-table-capabilities-tp20930053p20930310.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Decision table capabilities

2008-12-10 Thread Ravi Krishnamurthy

Thanks Sowmya.


Sowmya Yellamilli wrote:

unfortunately not possible
not only decision tables, across all drools implementations

because only 'when -- then' is permitted not 'otherwise'





Ravi Krishnamurthy wrote:
  

Hello:
1) Is it possible to write any if then else kind of rule instead of
stating all the possibilities in a decision table.

For example: if a == 25
   print (success)
 else if a == 10
   print (not bad)
 else
print (try again)

Thanks,
Ravi



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





--
View this message in context: 
http://www.nabble.com/Decision-table-capabilities-tp20930053p20930310.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] Books on Drools

2008-12-10 Thread Ravi Krishnamurthy

Thanks Mark\Ellen.

Regards,
Ravi

Mark Proctor wrote:

Ravi Krishnamurthy wrote:

Hello:
Could you suggest some books on Drools.
There are no specific Drools books at the moment, some are on the way. 
We list related recommended reading material on the documentation page:

http://labs.jboss.org/drools/documentation.html

Mark


Thanks,
Ravi


___
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] Books on Drools

2008-12-09 Thread Ravi Krishnamurthy

Hello:
Could you suggest some books on Drools.

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


[rules-users] Decision table capabilities

2008-12-09 Thread Ravi Krishnamurthy

Hello:
1) Is it possible to write any if then else kind of rule instead of 
stating all the possibilities in a decision table.


For example: if a == 25
  print (success)
else if a == 10
  print (not bad)
else
   print (try again)

Thanks,
Ravi
   

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


[rules-users] Some questions

2008-12-05 Thread Ravi Krishnamurthy

Hello:
Could some one give some input for the following questions
1) Can drools read the datas for facts from Excel
2) is Nested rules is supported in Drools
3) can rules communicate across .drl files
4) is there support for looping and collection

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


Re: [rules-users] How to monitor what rules are fired

2008-10-30 Thread Ravi Krishnamurthy

Thanks Michael.

Michael Neale wrote:

Hi Ravi - if you look at the classes in: org.drools.audit

For example: WorkingMemoryInMemoryLogger.java  - you can wrap that
around a session, and it will accumulate stuff in memory that you can
print out. You will want to have good "toString()" methods on your
fact objects - so you can inspect the state nicely.

But if you are caringly only about rules - take a look at LogEvent -
BEFORE_ACTIVATION_FIRE (or the AFTER equivalent) - they book end the
firing of a rules consequence - so pick one event type, and count it.
(I use that approach in a few places).



On Wed, Oct 29, 2008 at 4:42 AM, Ravi Krishnamurthy <[EMAIL PROTECTED]> wrote:
  

Thanks Michael.

I will look into it.

Regards,
Ravi

Michael Rhoden wrote:

Not sure if there are any examples around, but you could use
AgendaEventListener to see any rules firing.



-Michael
- Original Message -----
From: "Ravi Krishnamurthy" <[EMAIL PROTECTED]>
To: "Rules Users List" 
Sent: Monday, October 27, 2008 11:31:40 AM GMT -06:00 US/Canada Central
Subject: [rules-users] How to monitor what rules are fired

Hello:
Would like to monitor what rules are fired, how many times it is fired etc.

Is it possible to do this with Drools 4.x

Thanks for your help,
Ravi
___
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







--
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.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] How to monitor what rules are fired

2008-10-28 Thread Ravi Krishnamurthy

Thanks Michael.

I will look into it.

Regards,
Ravi

Michael Rhoden wrote:


Not sure if there are any examples around, but you could use 
AgendaEventListener to see any rules firing.


 


-Michael
- Original Message -
From: "Ravi Krishnamurthy" <[EMAIL PROTECTED]>
To: "Rules Users List" 
Sent: Monday, October 27, 2008 11:31:40 AM GMT -06:00 US/Canada Central
Subject: [rules-users] How to monitor what rules are fired

Hello:
Would like to monitor what rules are fired, how many times it is fired 
etc.


Is it possible to do this with Drools 4.x

Thanks for your help,
Ravi
___
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] How to monitor what rules are fired

2008-10-27 Thread Ravi Krishnamurthy

Hello:
Would like to monitor what rules are fired, how many times it is fired etc.

Is it possible to do this with Drools 4.x

Thanks for your help,
Ravi
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Turning on and off a particular rule

2008-09-02 Thread Ravi Krishnamurthy

Pallav:
the enabled keywork works.

In order to do this, the rules need to be updated at runtime. Wondering 
if there is any other way other than updating the rules to get this 
behavior during runtime.


Thanks,
Ravi

Ravi wrote:

Thanks Shyam, will try it out.

*From:* [EMAIL PROTECTED] 
[EMAIL PROTECTED] On Behalf Of Shyam, Pallav 
(MSCIBARRA) [EMAIL PROTECTED]

*Sent:* Monday, September 01, 2008 12:49 PM
*To:* rules-users@lists.jboss.org
*Subject:* Re: [rules-users] Turning on and off a particular rule

To turn off a rule write
enabled false

on the line after the rule name.

Pallav

- Original Message -
From: [EMAIL PROTECTED] 
<[EMAIL PROTECTED]>

To: Rules Users List 
Sent: Tue Sep 02 02:20:27 2008
Subject: [rules-users] Turning on and off a particular rule

Hello:
Wondering if it is possible to enable or disable a rule after the 
rules are defined in a project.


Thanks,
Ravi



NOTICE: If received in error, please destroy and notify sender. Sender 
does not intend to waive confidentiality or privilege. Use of this 
email is prohibited when received in error.




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


Re: [rules-users] Rule compilation error

2008-08-28 Thread Ravi Krishnamurthy

Removed the update(m) from the xsl. Then the command line worked fine.

Still not able to understand why it worked inside the eclipse and not 
outside.


regards,
Ravi

Ravi wrote:

Hello:
I had generated the decisiontable using the eclipse plugin for drools 
4.x. using the eclipse the DecisionsampleTest works fine but on 
running it from the command line gets the following error:

/C:\FirstDroolPrj\bin>java com.sample.DecisionTableTest
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule 
name=HelloWor

ld_11, agendaGroup=MAIN, salience=0, no-loop=false]
com/sample/Rule_HelloWorld_11_0.java (8:411) : The method 
update(Decisio

nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0
com/sample/Rule_HelloWorld_11_0.java (9:453) : The method 
update(Decisio

nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0

at org.drools.rule.Package.checkValidity(Package.java:419)
at 
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:2

92)
at 
com.sample.DecisionTableTest.readDecisionTable(DecisionTableTest.java

:62)
at com.sample.DecisionTableTest.main(DecisionTableTest.java:35)
/
Have attached the .xsl and the DecisionTableTest for the reference.

Thanks for your help and time,

Regards,
Ravi



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


[rules-users] Rule compilation error

2008-08-28 Thread Ravi Krishnamurthy

Hello:
I had generated the decisiontable using the eclipse plugin for drools 
4.x. using the eclipse the DecisionsampleTest works fine but on running 
it from the command line gets the following error:

/C:\FirstDroolPrj\bin>java com.sample.DecisionTableTest
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule 
name=HelloWor

ld_11, agendaGroup=MAIN, salience=0, no-loop=false]
   com/sample/Rule_HelloWorld_11_0.java (8:411) : The method 
update(Decisio

nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0
   com/sample/Rule_HelloWorld_11_0.java (9:453) : The method 
update(Decisio

nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0

   at org.drools.rule.Package.checkValidity(Package.java:419)
   at 
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:2

92)
   at 
com.sample.DecisionTableTest.readDecisionTable(DecisionTableTest.java

:62)
   at com.sample.DecisionTableTest.main(DecisionTableTest.java:35)
/
Have attached the .xsl and the DecisionTableTest for the reference.

Thanks for your help and time,

Regards,
Ravi



Sample.xls
Description: MS-Excel spreadsheet
package com.sample;

/*
 * Copyright 2005 JBoss Inc
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *  http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.io.StringReader;

import org.drools.RuleBase;
import org.drools.RuleBaseFactory;
import org.drools.WorkingMemory;
import org.drools.compiler.PackageBuilder;
import org.drools.decisiontable.InputType;
import org.drools.decisiontable.SpreadsheetCompiler;
import org.drools.rule.Package;

public class DecisionTableTest {

public static final void main(String[] args) {
try {
	
	//load up the rulebase
RuleBase ruleBase = readDecisionTable();
WorkingMemory workingMemory = ruleBase.newStatefulSession();

//go !
Message message = new Message();
message.setMessage(  "Hello World fellows" );
message.setStatus( Message.HELLO );
workingMemory.insert( message );
workingMemory.fireAllRules();   


} catch (Throwable t) {
t.printStackTrace();
}
}

/**
 * Please note that this is the "low level" rule assembly API.
 */
	private static RuleBase readDecisionTable() throws Exception {
		//read in the source
final SpreadsheetCompiler converter = new SpreadsheetCompiler();
final String drl = converter.compile( "/Sample.xls", InputType.XLS );
		PackageBuilder builder = new PackageBuilder();
		builder.addPackageFromDrl( new StringReader( drl ) );
		Package pkg = builder.getPackage();
		RuleBase ruleBase = RuleBaseFactory.newRuleBase();
		ruleBase.addPackage( pkg );
		return ruleBase;
	}

	public static class Message {
		public static final int HELLO = 0;
		public static final int GOODBYE = 1;
		
		private String message;
		
		private int status;
		
		public String getMessage() {
			return this.message;
		}
		
		public void setMessage(String message) {
			this.message = message;
		}
		
		public int getStatus() {
			return this.status;
		}
		
		public void setStatus( int status ) {
			this.status = status;
		}
	}

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