RE: [rules-users] Timer does not return!

2009-06-12 Thread Kris Verlaenen
Ajay,

Apparently the engine is in a deadlock in this specific situation.  The
reason is that, while in reactive mode (using fireUntilHalt()), the
engine does not accept any fireAllRules() invocations (which is used
internally in the process engine), and as a result blocks the process
from continuing.  In reactive mode, the engine should however simply
ignore fireAllRules() invocations (as it is executing already).  This
has been fixed on trunk.  So if you upgrade to the latest snapshot
(either get it here
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/
or build locally), you should be fine.

Regarding the second issue, what you are seeing is probably not the case
that the process has not ended, but the fact that the application does
not end automatically because the engine is still running in reactive
mode in a separate thread.  You can halt the engine by calling
ksession.halt().

Kris

Quoting ajay.gau...@rbs.com:

 Bump! Anyone?
 
 
 -Original Message-
 
 
 Thanks for the sample code Kris. It seems that the problem is not
 with the Timer itself, but with WorkItemHadler !
 
 (Complete code - extended version of your code - is attached). Adding
 a Log work item between START and the first Action breaks the code.
 If I remove the Log item, the flow works as expected. Here is the
 code that runs in executeWorkItem:
 
 logger.info(=== message from flow === +
 workItem.getParameter(Message));
 manager.completeWorkItem(workItem.getId(), null);
 logger.info(Work item completed!);
 
 the 2nd log message is not displayed!
 
 Any ideas what am I doing wrong?
 
 
 
 Second issue: The process does not end! - I took Kris's code and ran
 it. Even after the work flow completed, the process was still alive!
 (End Node's Terminate Property *is* set to true).
 
 
 Thanks
 
 Ajay
 
 
 -Original Message-
 From: Kris Verlaenen [mailto:kris.verlae...@cs.kuleuven.be] 
 Sent: Friday, June 05, 2009 5:08 PM
 To: Rules Users List; Gautam, Ajay, GBM
 Cc: rules-users@lists.jboss.org
 Subject: Re: [rules-users] Timer does not return!
 
 It's difficult to figure out what's going on without looking at the
 process itself, but your code seems to be fine.  If you run the
 engine
 in reactive mode (using fireUntilHalt), it should automatically fire
 the
 action associated with the timer once it goes off.  Note that, if
 you
 are not running in reactive mode, the timer is also triggered (it
 doesn't just run through), but it'll wait to execute the associated
 action until fireAllRules is called.
 
 For example, this simple process is a timer followed by an action
 writing out when the timer is being triggered.
 
 ?xml version=1.0 encoding=UTF-8? 
 process xmlns=http://drools.org/drools-5.0/process;
  xmlns:xs=http://www.w3.org/2001/XMLSchema-instance;
  xs:schemaLocation=http://drools.org/drools-5.0/process
 drools-processes-5.0.xsd
  type=RuleFlow name=ruleflow id=com.sample.ruleflow
 package-name=com.sample 
 
   header
   /header
 
   nodes
 start id=1 name=Start x=16 y=16 width=80 height=40
 /
 timerNode id=4 name=Timer x=128 y=16 width=80
 height=40
 delay=2000 /
 actionNode id=2 name=Action x=240 y=16 width=80
 height=40 
 action type=expression dialect=mvel
 System.out.println(Executing);/action
 /actionNode
 end id=3 name=End x=352 y=16 width=80 height=40 /
   /nodes
 
   connections
 connection from=1 to=4 /
 connection from=4 to=2 /
 connection from=2 to=3 /
   /connections
 
 /process
 
 By using the following code, the action is written out immediately
 when
 the timer triggers (after 2 seconds):
 
 public static final void main(String[] args) {
   try {
 // load up the knowledge base
 KnowledgeBase kbase = readKnowledgeBase();
 final StatefulKnowledgeSession ksession =
 kbase.newStatefulKnowledgeSession();
 new Thread(new Runnable() {
   public void run() {
 ksession.fireUntilHalt();
   }
 }).start();
 // start a new process instance
 ksession.startProcess(com.sample.ruleflow);
   } catch (Throwable t) {
 t.printStackTrace();
   }
 }
 
 The following code doesn't use reactive mode, so the action
 associated
 with the timer is only triggered during the next fireAllRules (after
 4
 seconds).
 
 public static final void main(String[] args) {
   try {
 // load up the knowledge base
 KnowledgeBase kbase = readKnowledgeBase();
 final StatefulKnowledgeSession ksession =
 kbase.newStatefulKnowledgeSession();
 // start a new process instance
 ksession.startProcess(com.sample.ruleflow);
 Thread.sleep(4000);
 ksession.fireAllRules();
   } catch (Throwable t) {
 t.printStackTrace();
   }
 }
 
 Hope this clears up the situation a little more.  If you still have
 problems integrating timers in your process, could you send a
 standalone
 example (containing both the process xml and the Java code)?
 
 Thx,
 Kris
 
 Quoting 

RE: [rules-users] Drools in the real world

2009-06-12 Thread Hehl, Thomas
We are using drools in our production software for decision support. We
mostly like the decision tables and how easy it is for me to allow a
user to modify the rules for a particular installation without me having
to write code.

We are, in fact, continuing to expand our usage of drools for new facets
of our application where the business rules are extremely complicated
and vary widely by implementation.

-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of
ajay.gau...@rbs.com
Sent: Friday, June 12, 2009 9:28 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Drools in the real world

Are people actually using Drools Or Drools Flow in production?

The traffic on this list seems way too low to suggest any serious
industry consideration.

OTOH, there are books out there for Drools. Which does suggest serious
usage.

What am I missing?

Ajay Gautam
*Please note that my email address may have changed. For all
future correspondence, please use this address*


This
message (including any attachments) is confidential and/or
privileged. It is to be used by the intended recipients only. If
you have received it by mistake please notify the sender by return
e-mail and delete this message from your system. Any unauthorized
use or dissemination of this message in whole or in part is
strictly prohibited. Please note that e-mails are inherently
insecure and susceptible to change. The Royal Bank of Scotland
Group, plc (RBS) and its US subsidiaries, and affiliates and
subsidiary undertakings, including but not limited to, RBS plc New
York and Connecticut Branches, RBS Securities Inc., ABN AMRO Bank
N.V. New York and Chicago Branches and, ABN AMRO Incorporated,
Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be
liable for the improper or incomplete transmission of the
information contained in this communication or Attachment nor for
any delay in its receipt or damage to your system. RBS does not
guarantee that the integrity of this communication has been
maintained nor that this communication is free of viruses,
interceptions or interference. RBS and its subsidiaries and
affiliates do not guarantee the accuracy of any email or
attachment, that an email will be received or that RBS or its
affiliates and subsidiaries will respond to an email.

RBS makes no representations that any information contained in this
message (including any attachments) are appropriate for use in all
locations or that transactions, securities, products, instruments
or services discussed herein are available or appropriate for sale
or use in all jurisdictions, or by all investors or counterparties.
Those who utilize this information do so on their own initiative
and are responsible for compliance with applicable local laws or
regulations.


___
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 in the real world

2009-06-12 Thread Ajay.Gautam
Are people actually using Drools Or Drools Flow in production?

The traffic on this list seems way too low to suggest any serious industry 
consideration.

OTOH, there are books out there for Drools. Which does suggest serious usage.

What am I missing?

Ajay Gautam
*Please note that my email address may have changed. For all
future correspondence, please use this address*


This
message (including any attachments) is confidential and/or
privileged. It is to be used by the intended recipients only. If
you have received it by mistake please notify the sender by return
e-mail and delete this message from your system. Any unauthorized
use or dissemination of this message in whole or in part is
strictly prohibited. Please note that e-mails are inherently
insecure and susceptible to change. The Royal Bank of Scotland
Group, plc (RBS) and its US subsidiaries, and affiliates and
subsidiary undertakings, including but not limited to, RBS plc New
York and Connecticut Branches, RBS Securities Inc., ABN AMRO Bank
N.V. New York and Chicago Branches and, ABN AMRO Incorporated,
Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be
liable for the improper or incomplete transmission of the
information contained in this communication or Attachment nor for
any delay in its receipt or damage to your system. RBS does not
guarantee that the integrity of this communication has been
maintained nor that this communication is free of viruses,
interceptions or interference. RBS and its subsidiaries and
affiliates do not guarantee the accuracy of any email or
attachment, that an email will be received or that RBS or its
affiliates and subsidiaries will respond to an email.

RBS makes no representations that any information contained in this
message (including any attachments) are appropriate for use in all
locations or that transactions, securities, products, instruments
or services discussed herein are available or appropriate for sale
or use in all jurisdictions, or by all investors or counterparties.
Those who utilize this information do so on their own initiative
and are responsible for compliance with applicable local laws or
regulations.

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


Re: [rules-users] Drools in the real world

2009-06-12 Thread David Sinclair
I have built 2 systems for *very* large and well know companies that rely
heavily on drools.

On Fri, Jun 12, 2009 at 9:32 AM, Hehl, Thomas thomas.h...@acs-inc.comwrote:

 We are using drools in our production software for decision support. We
 mostly like the decision tables and how easy it is for me to allow a
 user to modify the rules for a particular installation without me having
 to write code.

 We are, in fact, continuing to expand our usage of drools for new facets
 of our application where the business rules are extremely complicated
 and vary widely by implementation.

 -Original Message-
 From: rules-users-boun...@lists.jboss.org
 [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of
 ajay.gau...@rbs.com
 Sent: Friday, June 12, 2009 9:28 AM
 To: rules-users@lists.jboss.org
 Subject: [rules-users] Drools in the real world

 Are people actually using Drools Or Drools Flow in production?

 The traffic on this list seems way too low to suggest any serious
 industry consideration.

 OTOH, there are books out there for Drools. Which does suggest serious
 usage.

 What am I missing?

 Ajay Gautam
 *Please note that my email address may have changed. For all
 future correspondence, please use this address*


 This
 message (including any attachments) is confidential and/or
 privileged. It is to be used by the intended recipients only. If
 you have received it by mistake please notify the sender by return
 e-mail and delete this message from your system. Any unauthorized
 use or dissemination of this message in whole or in part is
 strictly prohibited. Please note that e-mails are inherently
 insecure and susceptible to change. The Royal Bank of Scotland
 Group, plc (RBS) and its US subsidiaries, and affiliates and
 subsidiary undertakings, including but not limited to, RBS plc New
 York and Connecticut Branches, RBS Securities Inc., ABN AMRO Bank
 N.V. New York and Chicago Branches and, ABN AMRO Incorporated,
 Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be
 liable for the improper or incomplete transmission of the
 information contained in this communication or Attachment nor for
 any delay in its receipt or damage to your system. RBS does not
 guarantee that the integrity of this communication has been
 maintained nor that this communication is free of viruses,
 interceptions or interference. RBS and its subsidiaries and
 affiliates do not guarantee the accuracy of any email or
 attachment, that an email will be received or that RBS or its
 affiliates and subsidiaries will respond to an email.

 RBS makes no representations that any information contained in this
 message (including any attachments) are appropriate for use in all
 locations or that transactions, securities, products, instruments
 or services discussed herein are available or appropriate for sale
 or use in all jurisdictions, or by all investors or counterparties.
 Those who utilize this information do so on their own initiative
 and are responsible for compliance with applicable local laws or
 regulations.
 

 ___
 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] Drools in the real world

2009-06-12 Thread Michael Rhoden
We have been using Drools since version 2, and currently have well over 10,000 
rules in production. It is a very solid product that can be used anywhere an 
Ilog etc would be considered. Drools Flow is a bit new, although I know there 
are several companies who have it in production. We are currently testing it 
internally, and it shows huge promise. 

-Michael 


- Original Message - 
From: Ajay Gautam ajay.gau...@rbs.com 
To: rules-users@lists.jboss.org 
Sent: Friday, June 12, 2009 8:28:26 AM GMT -06:00 US/Canada Central 
Subject: [rules-users] Drools in the real world 

Are people actually using Drools Or Drools Flow in production? 

The traffic on this list seems way too low to suggest any serious industry 
consideration. 

OTOH, there are books out there for Drools. Which does suggest serious usage. 

What am I missing? 

Ajay Gautam 
*Please note that my email address may have changed. For all 
future correspondence, please use this address* 


This 
message (including any attachments) is confidential and/or 
privileged. It is to be used by the intended recipients only. If 
you have received it by mistake please notify the sender by return 
e-mail and delete this message from your system. Any unauthorized 
use or dissemination of this message in whole or in part is 
strictly prohibited. Please note that e-mails are inherently 
insecure and susceptible to change. The Royal Bank of Scotland 
Group, plc (RBS) and its US subsidiaries, and affiliates and 
subsidiary undertakings, including but not limited to, RBS plc New 
York and Connecticut Branches, RBS Securities Inc., ABN AMRO Bank 
N.V. New York and Chicago Branches and, ABN AMRO Incorporated, 
Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be 
liable for the improper or incomplete transmission of the 
information contained in this communication or Attachment nor for 
any delay in its receipt or damage to your system. RBS does not 
guarantee that the integrity of this communication has been 
maintained nor that this communication is free of viruses, 
interceptions or interference. RBS and its subsidiaries and 
affiliates do not guarantee the accuracy of any email or 
attachment, that an email will be received or that RBS or its 
affiliates and subsidiaries will respond to an email. 

RBS makes no representations that any information contained in this 
message (including any attachments) are appropriate for use in all 
locations or that transactions, securities, products, instruments 
or services discussed herein are available or appropriate for sale 
or use in all jurisdictions, or by all investors or counterparties. 
Those who utilize this information do so on their own initiative 
and are responsible for compliance with applicable local laws or 
regulations.
 

___ 
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] Drools in the real world

2009-06-12 Thread Nicolas Héron
Hello,
For the last 3 years, i have done 5 projects in production with drools 4.0.7
as I started that business in my company
And we have currently 5 project that will start this year with brms
In my company, i do a drools training starting end of month and 5 more times
in september and october.
I answer (we are 8000 in France) with drools 5 or 6 times a month without
people trained. Wait one or two years and ilog/ibm will be wipped out !
It is a clear serious Industry tool
One of our customer is using it in  a loyalty system in shops (supermarket
from 10 to 140 cash machines). Per day on the biggest shop thery are over
3 custumer/day = 0 bug
Another customer is using it for collection calculation and  buget
consideration = millions of € calculation for one year = 700 shop customer
that is counting on drools to prepare the product collection
and we have other
yes it works and fine
regads
Nicolas Heron
PS : did you go on the irc channel ? you should !

2009/6/12 ajay.gau...@rbs.com

 Are people actually using Drools Or Drools Flow in production?

 The traffic on this list seems way too low to suggest any serious industry
 consideration.

 OTOH, there are books out there for Drools. Which does suggest serious
 usage.

 What am I missing?

 Ajay Gautam
 *Please note that my email address may have changed. For all
 future correspondence, please use this address*


 This
 message (including any attachments) is confidential and/or
 privileged. It is to be used by the intended recipients only. If
 you have received it by mistake please notify the sender by return
 e-mail and delete this message from your system. Any unauthorized
 use or dissemination of this message in whole or in part is
 strictly prohibited. Please note that e-mails are inherently
 insecure and susceptible to change. The Royal Bank of Scotland
 Group, plc (RBS) and its US subsidiaries, and affiliates and
 subsidiary undertakings, including but not limited to, RBS plc New
 York and Connecticut Branches, RBS Securities Inc., ABN AMRO Bank
 N.V. New York and Chicago Branches and, ABN AMRO Incorporated,
 Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be
 liable for the improper or incomplete transmission of the
 information contained in this communication or Attachment nor for
 any delay in its receipt or damage to your system. RBS does not
 guarantee that the integrity of this communication has been
 maintained nor that this communication is free of viruses,
 interceptions or interference. RBS and its subsidiaries and
 affiliates do not guarantee the accuracy of any email or
 attachment, that an email will be received or that RBS or its
 affiliates and subsidiaries will respond to an email.

 RBS makes no representations that any information contained in this
 message (including any attachments) are appropriate for use in all
 locations or that transactions, securities, products, instruments
 or services discussed herein are available or appropriate for sale
 or use in all jurisdictions, or by all investors or counterparties.
 Those who utilize this information do so on their own initiative
 and are responsible for compliance with applicable local laws or

 regulations.

 ___
 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] unable to determine value type class *** URGENT***

2009-06-12 Thread Corneil du Plessis


Srithu wrote:
 
 I have a wired behavior..
 
 I have a set of rules and i have used drools-guvnor to packaging them...
 It is working in windows machines where i have jboss which is running on
 IBM java 5 and 6..
 
 When i connect the same from  jboss Which is running on 64 bit IBM java 6
 on linux is not working...
 The same is working If i used 64 bit IBM java 5 on linux.
 
 
 I getting following exception...
 
 
 
 Please help
 
 [2009-02-11 12:30:29,697] [705980] [http-0.0.0.0-8080-12] [ERROR]
 [STDERR ] - org.drools.RuntimeDroolsException: unable to determine
 ValueType for Class [class java.lang.Object]
 
 [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
 [STDERR ] - at
 org.drools.base.ValueType.determineValueType(ValueType.java:193)
 
 [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
 [STDERR ] - at
 org.drools.base.ValueType.readResolve(ValueType.java:125)
 
 [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
 [STDERR ] - at
 sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
 
 [2009   -02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12]
 [ERROR] [STDERR ] - at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
 
 [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
 [STDERR ] - at java.lang.reflect.Method.invoke(Method.java:599)
 
 [deleted stacktrace]
 
 
We are experiencing same issue on WebSphere 6.1 FP 23 on Linux and AIX.
Has anyone found a resolution?

Regards

Corneil

-- 
View this message in context: 
http://www.nabble.com/unable-to-determine-value-type-class--***-URGENT***-tp21950333p24000218.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] Drools in the real world

2009-06-12 Thread Edson Tirelli
  Ajay,

  I don't know what kind of relationship you draw from list traffic to
serious adoption. In any case, do some research and you will certainly
re-evaluate your metrics. :)

  Just as a starting point, last week we had the Drools Bootcamp in SF (
http://blog.athico.com/2009/03/drools-boot-camp-san-francisco-june.html),
and that is one of the reasons for the reduced traffic in the last couple
weeks I guess. Take a look at the attendance list and the companies they
come from:

http://www.jboss.org/community/wiki/DroolsBootCampSanFranciscoJune2009

  Sightings page:

http://www.jboss.org/drools/sightings.html

  Anyway, what I can tell you is that Drools is in really active and
constant development, with a growing and energizing community that supports
its members in the best possible open source way (thank you all people). On
top of that, if you want professional support with SLAs, talk to Red Hat
that offers all kind of services around the product (from support to
training).

  Cheers,
Edson


2009/6/12 ajay.gau...@rbs.com

 Are people actually using Drools Or Drools Flow in production?

 The traffic on this list seems way too low to suggest any serious industry
 consideration.

 OTOH, there are books out there for Drools. Which does suggest serious
 usage.

 What am I missing?

 Ajay Gautam
 *Please note that my email address may have changed. For all
 future correspondence, please use this address*



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


[rules-users] setFocus

2009-06-12 Thread Earnest Dyke
Converting a 4.0.7 project to 5.0.1 and StatefulKnowledgeSession does not have 
a .setFocus method like StatefulSession has. How do I accomplish the same 
function in 5.0.1?

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


Re: [rules-users] setFocus

2009-06-12 Thread Wolfgang Laun
For instance:

ksession.getAgenda().getAgendaGroup( Group A ).setFocus();

-W


2009/6/12 Earnest Dyke earnied...@yahoo.com

 Converting a 4.0.7 project to 5.0.1 and StatefulKnowledgeSession does not
 have a .setFocus method like StatefulSession has. How do I accomplish the
 same function in 5.0.1?

 Earnie!

 ___
 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] setFocus

2009-06-12 Thread Edson Tirelli
   getAgenda().getAgendaGroup(String group).setFocus();

   We are still discussing if we should create a helper method for this or
keeping it normalized like that is good enough.

   []s
   Edson

2009/6/12 Earnest Dyke earnied...@yahoo.com

 Converting a 4.0.7 project to 5.0.1 and StatefulKnowledgeSession does not
 have a .setFocus method like StatefulSession has. How do I accomplish the
 same function in 5.0.1?

 Earnie!

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




-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of 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] unable to determine value type class *** URGENT***

2009-06-12 Thread Edson Tirelli
   Ok, I saw this problem raised a couple times and it seems to be related
with the JVM, not really the app server. It is a classloader problem.

   Unfortunately, I could not reproduce this in my environment, so if anyone
capable of reproducing the problem is willing to work with me on this, we
can look for a solution. First of all, I need the complete stack trace of
the problem, as well as drools version, mvel version, complete JVM version
and revision. Then, it would be good if you can isolate the problem in a
small test case, otherwise we will have to go without it for now.

   Having that information, I will try to make some code changes and send
you and see what happens.

   Thank you,
   Edson



2009/6/12 Corneil du Plessis corn...@tsctech.com



 Srithu wrote:
 
  I have a wired behavior..
 
  I have a set of rules and i have used drools-guvnor to packaging them...
  It is working in windows machines where i have jboss which is running on
  IBM java 5 and 6..
 
  When i connect the same from  jboss Which is running on 64 bit IBM java 6
  on linux is not working...
  The same is working If i used 64 bit IBM java 5 on linux.
 
 
  I getting following exception...
 
 
 
  Please help
 
  [2009-02-11 12:30:29,697] [705980] [http-0.0.0.0-8080-12] [ERROR]
  [STDERR ] - org.drools.RuntimeDroolsException: unable to determine
  ValueType for Class [class java.lang.Object]
 
  [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
  [STDERR ] - at
  org.drools.base.ValueType.determineValueType(ValueType.java:193)
 
  [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
  [STDERR ] - at
  org.drools.base.ValueType.readResolve(ValueType.java:125)
 
  [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
  [STDERR ] - at
  sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
 
  [2009   -02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12]
  [ERROR] [STDERR ] - at
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
 
  [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
  [STDERR ] - at java.lang.reflect.Method.invoke(Method.java:599)
 
  [deleted stacktrace]
 
 
 We are experiencing same issue on WebSphere 6.1 FP 23 on Linux and AIX.
 Has anyone found a resolution?

 Regards

 Corneil

 --
 View this message in context:
 http://www.nabble.com/unable-to-determine-value-type-class--***-URGENT***-tp21950333p24000218.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




-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of 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] example needed

2009-06-12 Thread Mauricio Salatino
I would like to work on that application to have a clear example. But I
don't find a good topic to do it..
If some one have a very clear topic.. I can do the examples with that...


On Fri, Jun 12, 2009 at 7:12 AM, Parvez Shah parvezs...@gmail.com wrote:

 Is there a Pet store kind of example available which a newbie can download
 and learn how actually different component in a web application interact
 with drools using best practice, i have the book  jboss drools Business rule
 by  Paul Browne,  but i still feel there is a need for pet store kind of
 application, can any one guide me where i can find some appliaction using
 drools which i can download and understand full capability of drools
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




-- 
- http://salaboy.wordpress.com
- 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


Re: [rules-users] setFocus

2009-06-12 Thread Earnest Dyke
Thanks Wolfgang. As usually happens I found this 10 minutes after I sent the 
email. :-)

Earnie!





From: Wolfgang Laun wolfgang.l...@gmail.com
To: Rules Users List rules-users@lists.jboss.org
Sent: Friday, June 12, 2009 11:49:31 AM
Subject: Re: [rules-users] setFocus


For instance:

ksession.getAgenda().getAgendaGroup( Group A ).setFocus();

-W


2009/6/12 Earnest Dyke earnied...@yahoo.com

Converting a 4.0.7 project to 5.0.1 and StatefulKnowledgeSession does not have 
a .setFocus method like StatefulSession has. How do I accomplish the same 
function in 5.0.1?

Earnie!

___
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] Throwing runtimeException 4.0.7 not supposed

2009-06-12 Thread surya_n2007

Throwing runtime exception in this example inserted person object as person
name is null. Ideally need to add error 
P01 and in second rule checks for precondition P01 exist and skip rule.
But i am getting the below error. 
Please let me know this is bug, i dont want to check again Second Rule
name object is not null.
 I think this is happening since drools frist try to run all rules before
start execution.

please let me know whether anything wrong on my end.


Rule Engine COde :

   Person person = test.new Person();
// Name name = person.new Name();
// person.setName(name);
   workingMemory.insert(person);


rule First Rule salience 100 lock-on-active true
when
person : Person()
eval(person.name == null)
then
person.errors.add(P01);
System.out.println(Rule 1 invoked+person.errors);
update(person);
end

rule Second Rule salience 99 lock-on-active true
when
person : Person()
eval(!person.errors.contains(P01))
eval(person.name.firstName==Bob)  
then
person.name.suffix=Mr;
System.out.println(Rule 2 invoked);
end




org.drools.RuntimeDroolsException:
com.sample.rule_second_rule_0eval1invo...@4b42aa1e :
java.lang.NullPointerException
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:82)
at
org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:148)
at
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:29)
at
org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:157)
at
org.drools.reteoo.CompositeTupleSinkAdapter.createAndPropagateAssertTuple(CompositeTupleSinkAdapter.java:73)
at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at 
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at 
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
at com.sample.DroolsTest.main(DroolsTest.java:36)
Caused by: java.lang.NullPointerException
at com.sample.Rule_Second_Rule_0.eval1(Rule_Second_Rule_0.java:14)
at
com.sample.Rule_Second_Rule_0Eval1Invoker.evaluate(Rule_Second_Rule_0Eval1Invoker.java:20)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:77)
... 14 more

-- 
View this message in context: 
http://www.nabble.com/Throwing-runtimeException-4.0.7-not-supposed-tp24000738p24000738.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] Drools in the real world

2009-06-12 Thread Wolfgang Laun
The traffic on this list is quite substantial. Note that it is used if
people run
into a problem, not when they solve one. Judging Drools' industry usage from
the traffic here is akin to saying that fine weather is tied to the Moon
being
full, which you don't see when it is new nor when the sky is overcast... ;-)

-W


On Fri, Jun 12, 2009 at 3:28 PM, ajay.gau...@rbs.com wrote:

 Are people actually using Drools Or Drools Flow in production?

 The traffic on this list seems way too low to suggest any serious industry
 consideration.

 OTOH, there are books out there for Drools. Which does suggest serious
 usage.

 What am I missing?

 Ajay Gautam
 *Please note that my email address may have changed. For all
 future correspondence, please use this address*


 This
 message (including any attachments) is confidential and/or
 privileged. It is to be used by the intended recipients only. If
 you have received it by mistake please notify the sender by return
 e-mail and delete this message from your system. Any unauthorized
 use or dissemination of this message in whole or in part is
 strictly prohibited. Please note that e-mails are inherently
 insecure and susceptible to change. The Royal Bank of Scotland
 Group, plc (RBS) and its US subsidiaries, and affiliates and
 subsidiary undertakings, including but not limited to, RBS plc New
 York and Connecticut Branches, RBS Securities Inc., ABN AMRO Bank
 N.V. New York and Chicago Branches and, ABN AMRO Incorporated,
 Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be
 liable for the improper or incomplete transmission of the
 information contained in this communication or Attachment nor for
 any delay in its receipt or damage to your system. RBS does not
 guarantee that the integrity of this communication has been
 maintained nor that this communication is free of viruses,
 interceptions or interference. RBS and its subsidiaries and
 affiliates do not guarantee the accuracy of any email or
 attachment, that an email will be received or that RBS or its
 affiliates and subsidiaries will respond to an email.

 RBS makes no representations that any information contained in this
 message (including any attachments) are appropriate for use in all
 locations or that transactions, securities, products, instruments
 or services discussed herein are available or appropriate for sale
 or use in all jurisdictions, or by all investors or counterparties.
 Those who utilize this information do so on their own initiative
 and are responsible for compliance with applicable local laws or

 regulations.

 ___
 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] setFocus

2009-06-12 Thread Earnest Dyke
I vote helper method. :-)

Earnie!





From: Edson Tirelli tire...@post.com
To: Rules Users List rules-users@lists.jboss.org
Sent: Friday, June 12, 2009 11:59:40 AM
Subject: Re: [rules-users] setFocus


   getAgenda().getAgendaGroup(String group).setFocus();

   We are still discussing if we should create a helper method for this or 
keeping it normalized like that is good enough.

   []s
   Edson


2009/6/12 Earnest Dyke earnied...@yahoo.com

Converting a 4.0.7 project to 5.0.1 and StatefulKnowledgeSession does not have 
a .setFocus method like StatefulSession has. How do I accomplish the same 
function in 5.0.1?

Earnie!

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




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


[rules-users] multiple .drl files

2009-06-12 Thread Chris Richmond
Hello all,

 

I want to create a baseline rules file with Fusion that does some basic
aggregating that I know I will need later.things like keep running averages
over the last minute or so of several object values.

 

Is it possible to then inherit or at least reference those aggregates I am
keeping track of from another .drl file in some way.allowing me to always
keep my basic aggregation functions in one rule file and then add additional
rules/functions to my rule memory space later.or must any further rules that
wish to reference those aggregate or statistics objects also be contained
within the same .drl file?  I understand I can have multiple .drl files, but
I am wondering specifically about referencing objects and variables created
in another rules file.

 

 

Thanks,


Chris

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


Re: [rules-users] unable to determine value type class *** URGENT***

2009-06-12 Thread Rick Lacy
We experienced the same problem when we upgraded to WebSphere 6.1 FP 24 for
z/os.  We were running Drools 4.0.4 at the time.  I don't recall all the jar
dependency versions, but we didn't change mvel from whatever Drools 4.0.4
came packaged with.  After some testing, we found that Drools 5.0.1 did not
exhibit the same problem.  Fortunately, upgrading was an option for us and
we've been running fine since.

I noticed that the catch-all test for ValueType.OBJECT_TYPE in
ValueType.determineValueType changed from an instanceof test in 4.0.4 to an
Object.class.isAssignableFrom test in 5.0.1.  I wondered if a classloader
issue caused a difference in the way to two tests were performed, though I
didn't have time to investigate the theory.

Regards,


Rick

On 6/12/09, Corneil du Plessis corn...@tsctech.com wrote:




 Edson Tirelli-3 wrote:
 
 Ok, I saw this problem raised a couple times and it seems to be
 related
  with the JVM, not really the app server. It is a classloader problem.
 
 Unfortunately, I could not reproduce this in my environment, so if
  anyone
  capable of reproducing the problem is willing to work with me on this, we
  can look for a solution. First of all, I need the complete stack trace of
  the problem, as well as drools version, mvel version, complete JVM
 version
  and revision. Then, it would be good if you can isolate the problem in a
  small test case, otherwise we will have to go without it for now.
 
 Having that information, I will try to make some code changes and send
  you and see what happens.
 
 Thank you,
 Edson
 
 
 
  2009/6/12 Corneil du Plessis corn...@tsctech.com
 
 
 
  Srithu wrote:
  
   I have a wired behavior..
  
   I have a set of rules and i have used drools-guvnor to packaging
  them...
   It is working in windows machines where i have jboss which is running
  on
   IBM java 5 and 6..
  
   When i connect the same from  jboss Which is running on 64 bit IBM
 java
  6
   on linux is not working...
   The same is working If i used 64 bit IBM java 5 on linux.
  
  
   I getting following exception...
  
  
  
   Please help
  
   [2009-02-11 12:30:29,697] [705980] [http-0.0.0.0-8080-12] [ERROR]
   [STDERR ] - org.drools.RuntimeDroolsException: unable to determine
   ValueType for Class [class java.lang.Object]
  
   [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
   [STDERR ] - at
   org.drools.base.ValueType.determineValueType(ValueType.java:193)
  
   [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
   [STDERR ] - at
   org.drools.base.ValueType.readResolve(ValueType.java:125)
  
   [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
   [STDERR ] - at
   sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
  
   [2009   -02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12]
   [ERROR] [STDERR ] - at
  
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
  
   [2009-02-11 12:30:29,698] [705981] [http-0.0.0.0-8080-12] [ERROR]
   [STDERR ] - at
  java.lang.reflect.Method.invoke(Method.java:599)
  
   [deleted stacktrace]
  
  
  We are experiencing same issue on WebSphere 6.1 FP 23 on Linux and AIX.
  Has anyone found a resolution?
 
  Regards
 
  Corneil
 
  --
  View this message in context:
 
 http://www.nabble.com/unable-to-determine-value-type-class--***-URGENT***-tp21950333p24000218.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
 
 
 
 
  --
   Edson Tirelli
   JBoss Drools Core Development
   JBoss, a division of Red Hat @ www.jboss.com
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 

 I am sure it is not a Drools problem because everything worked fine on
 WebSphere 6.1 FP 17 and 21 but with FP 23 the problem started.
 We did raise an issue with IBM to see if it is possible to find a solution.
 --
 View this message in context:
 http://www.nabble.com/unable-to-determine-value-type-class--***-URGENT***-tp21950333p24005424.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 fusion memory management

2009-06-12 Thread Chris Richmond
Hello,

 

I wanted to ask this question in a separate email so as to keep each email
to one topic for easier thread following.  Let me know if you prefer
multiple questions per email next time.

 


I am using Drools fusion basically with some success where I am at this
point only running some aggregates and calling some java functions when a
running average over the last 1 minute or so drops below a certain value.   

 

The sources for those values come from objects I am injecting into memory
space, but I am not specifically calling retraction code since it is my
understanding that I can set the policy in the rule file for how long to
hold objects in memory.  So for example I have this rule which simpoly
outputs to out when the average goes above 100 for the last 10 items(you can
tell I created mine based on the stock ticker).  It seems to be working, but
I have some questions to ensure I understand before moving forward.

 

 

So below the declare MyObject with assigning it role event with a default
expiration of 2 minutes.  Is my undertanding correct that fusion will
disregard thos objects that are injected without me having to take any other
action?  

 

Also, in my show averages rule below, if I did ont have the declare
MyObject delcaration with expiration policy set, would fusion automatially
throw away MyObjects older than the last 10  based on my rule no longer
needing them?If it would, then which takes priority, the expires
declaration for MyObject or the no longer needed by my aggregate rule below.
I am assuming that the rule would keep them beyond 2 minutes it it was
necessary, but is this correct?  If the rule as written would not
automatically remove objects from memory space, then is there something I
could do to tell the rule to do so when it is no longer needed by my
aggregate?

 

Thanks,


Chris

 

 

 

 

 

 

imports removed

 

 

# default dialect for the semantic code will be MVEL

dialect mvel

 

# tells the engine that a object instance will assume the

# role (semantics) of events and that the default retention 

# policy will be 2 minutes 

declare MyObject

@role( event )

@expires( 2m )

end 

 

 

rule show averages

when

 

  $n : Number( doubleValue  100 ) from accumulate (

 



  

$stat:MyObject($bc: byteCount, srcIPAddress == 10.5.0.4) over
window:length(10) from entry-point MyObject stream,

 

average( $bc )



) 





then

 

System.err.println(average:  + $n)

end 

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


Re: [rules-users] multiple .drl files

2009-06-12 Thread Edson Tirelli
   All bound variables are always scoped to the rule, but you can use rules
inheritance to extend the rules with your aggregates. It is not the same
thing, but might achieve the results you are looking for.

   []s
   Edson

2009/6/12 Chris Richmond crichm...@referentia.com

  Hello all,



 I want to create a baseline rules file with Fusion that does some basic
 aggregating that I know I will need later…things like keep running averages
 over the last minute or so of several object values.



 Is it possible to then “inherit” or at least reference those aggregates I
 am keeping track of from another .drl file in some way…allowing me to always
 keep my basic aggregation functions in one rule file and then add additional
 rules/functions to my rule memory space later…or must any further rules that
 wish to reference those aggregate or statistics objects also be contained
 within the same .drl file?  I understand I can have multiple .drl files, but
 I am wondering specifically about referencing objects and variables created
 in another rules file.





 Thanks,


 Chris

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




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