[rules-users] Problem with eval

2011-10-24 Thread rahulkrishnan
some times when am using eval am getting this error

unable to build expression *eval:null(condition i give)*

i have used like this
$work : WorkClass
*eval($work.getStatus(5))* // here was the exception



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


Re: [rules-users] Problem with eval

2011-10-24 Thread rahulkrishnan
is it because  i have used a object in session inside the eval

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


[rules-users] How to use GlobalArea enum inside package defined rules

2011-10-24 Thread pravinborekar
Hi, 

Would like to use GlobalArea enumeration - 'Member.title': ['Mr.',
'Miss']

in my custom package rule. Am trying to access it in DSL rule (as we want
guided editor to use enum), like {title:ENUM:Member.title}

If I create above enum in custom package, am able to do it cleanly.
Also tried using --- {title:ENUM:GlobalArea.Member.title} , but it didnt
work.

Need help on how to access the global area enum, as we need to use the same
across many packages.


Regards, Pravin



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-use-GlobalArea-enum-inside-package-defined-rules-tp3447360p3447360.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to use GlobalArea enum inside package defined rules

2011-10-24 Thread Michael Anstis
AFAIK, you still need to import the asset from the Global Aarea into your
package.

Think of it like creating a symlink\shortcut between the Global Area and
your package - changes to the asset in the Global Area will be visible in
your package.

Assets in the Global Area are not automatically visible to all packages.

On 24 October 2011 08:20, pravinborekar pravin.bore...@gmail.com wrote:

 Hi,

 Would like to use GlobalArea enumeration - 'Member.title': ['Mr.',
 'Miss']

 in my custom package rule. Am trying to access it in DSL rule (as we want
 guided editor to use enum), like {title:ENUM:Member.title}

 If I create above enum in custom package, am able to do it cleanly.
 Also tried using --- {title:ENUM:GlobalArea.Member.title} , but it didnt
 work.

 Need help on how to access the global area enum, as we need to use the same
 across many packages.


 Regards, Pravin



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-to-use-GlobalArea-enum-inside-package-defined-rules-tp3447360p3447360.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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


Re: [rules-users] Regarding BPEL

2011-10-24 Thread Sumeet Karawal
Thank you. This was really helpful.

Regards,
Sumeet
Mailto: sumeet.kara...@tcs.com



  
  From:   Mauricio Salatino sala...@gmail.com 
  

  
  To: Rules Users List rules-users@lists.jboss.org
  

  
  Date:   10/21/2011 04:15 PM   
  

  
  Subject:Re: [rules-users] Regarding BPEL  
  

  
  Sent by:rules-users-boun...@lists.jboss.org   
  

  





Definitely we are not in the same page :)
BPMN is also a semi-structured language to define business processes (BP
from BPEL and BPMN). The version 2 of the standard defines the language and
the execution semantic for defining Business Processes with a wider scope
than BPEL. Of course that BPEL and BPMN are not the same, but I think that
you can achieve most of the things that you want to achieve with BPEL with
BPMN (I'm not sure what are you trying to achieve, but we can discuss that
in another thread). In the case of BPMN, Drools is not the one responsible
for the process execution and jBPM5 is. Where jBPM5 is right now a former
module of the Drools Project. jBPM5 provides you a generic process engine
capable of understanding more than one process definition language, but
right now the project is focused on running BPMN models. In other words,
jBPM5 is capable of running BPEL process, but right now the parsers for the
BPEL models are not in place. Most of the BPMS vendors are adopting BPMN as
a defacto notation and I think that for that reason jBPM5 is only focused
in this language now.

Hope it helps..

Cheers



On Thu, Oct 20, 2011 at 2:18 PM, Jamie js...@llbean.com wrote:
  I'm not sure your answer directly addresses the question.  BPMN and BPEL
  aren't the same thing - BPMN is an unstructured diagramming notation that
  an
  be directly executed from within Drools, where as BPEL is a
  semi-structured
  language.  While most BPMN flows can be translated to BPEL, not
  everything
  in BPMN can be represented in BPEL.  I don't believe that Drools can
  directly execute BPEL (but I'm sure others will correct me if I'm wrong
  about that)

  --
  View this message in context:
  
http://drools.46999.n3.nabble.com/rules-users-Regarding-BPEL-tp3437430p3438367.html

  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users



--
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jugargentina.org
 - 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




=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




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


[rules-users] Drools 5.3.0.Final is released

2011-10-24 Thread Toni Rikkola
http://blog.athico.com/2011/10/drools-530final-released-including.html

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


[rules-users] Validation flow - defer expression evaluation

2011-10-24 Thread peters
Hi,

I was wondering which is the proper way to do sanity checks (not null
etc...) on a fact  before starting the actual business rules.
I have created a a ruleflow with a validation node (VALRFG) and a business
rule node (BRRFG) to determine execution order.
If in the validation node a not null constraint is violated, the session is
aborted (drools.halt()).
Problem with this approach is that assertions defined in rules of the
ruleflow-group BRRFG are validated before the validation rules execute. 
The engine throws exception  at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:298)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130).
...
at
org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:101)
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)

How can I make sure that the validation rules are executed before the mvel
expressions in the business rules are being evaluated? 


Thanks for feedback,


--
View this message in context: 
http://drools.46999.n3.nabble.com/Validation-flow-defer-expression-evaluation-tp3447883p3447883.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to use GlobalArea enum inside package defined rules

2011-10-24 Thread pravinborekar
Thanks for the reply. Actually I was trying to work it out the REST API way,
I used for my other purpose.

I understand that Global area wont be accessible directly, but couldnt find
related content on net.
 
Since I am a beginner to drools, am still working on importing the assets
from Global Area...

Thanks,
Pravin



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-use-GlobalArea-enum-inside-package-defined-rules-tp3447360p3448092.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Performance /Memory Leak Issue

2011-10-24 Thread arrehman
Hi,

I am not much of an expert on Drools. I got a DRL file (very small rule set
of less than 10 rules, that checks few conditions, also includes DB calls).
I use Drools 5.2 inside a grails application. I am using stateful session. I
call this rules 100,000 times for each for each of the 100,000 records that
I want to validate. However the performance gradually deteriorates.  What
could be going on here? General advice on how to approach solving this,
improving performance. Should I be using stateless drools session? How do I
configure the Drools MBeans so I can monitor Drools better?
PS: I can provide more details as you needed. I can paste the general gist
of the code and DRL file. Any help is greatly appreciated. I spent two days
on this with no results.

Thanks,
Abdul



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


Re: [rules-users] Drools Performance /Memory Leak Issue

2011-10-24 Thread arrehman
Hi,

Are there any instructions on how to enable JMX Beans and monitor Drools
using JConsole or JVisualVM anywhere?

Thanks,
Abdul

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


Re: [rules-users] Validation flow - defer expression evaluation

2011-10-24 Thread zstlaw
There are a couple different options available.

I haven't tried it but some of what you are trying to do sounds suspiciously
like what you are trying to do is a workfow process or rules plan.  Which
might mean you want to look at planner or consider how you are approaching
the problem.

If they were in the same group I know you can literally do what you want by
adding the salience keyword to one of your rules. example - 

rule print mail messages
salience -100 // run this after other rules have finished
dialect mvel
when
$m : Message( )
then
System.out.println( Message was +$m );
end

I am not sure if it works between groups though I thought there were ways to
state order of group activation but that has never been part of the
documentation I use so I can't help you much there.  But as a third option I
would suggest if you are using mvel you just use the feature of the language
to do null checks in the business logic if that is feasible for you. 
Example 

$var: user.?manager.name
is supposedly functionally equivalent to writing:
if (user.manager != null) { $var=user.manager.name; } else { $var=null; }

So you might just be able to test the data more elegantly inline.  But it
really depends on what you are trying to do and why.

Hope this helped!  If not I expect someone more familiar with the planning
or enterprise tools may speak up.
Zachary

--
View this message in context: 
http://drools.46999.n3.nabble.com/Validation-flow-defer-expression-evaluation-tp3447883p3448375.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] How to use lists in RHS when using MVEL?

2011-10-24 Thread zstlaw
I want to make an array and pass it to a method in the RHS but can't when I
use mvel.  If I use mvel then java new Object[3] causes compile errors.  If
I use the mvel syntax the object is not an real array, only a string in
mvel's special array notation which is not useful for the functions I am
trying to call.  Working example:

rule Array bug
dialect java // explicit java or mvel barfs on new Object[];
when
Message( )
then
Object[] logArgs = new Object[3];
logArgs[0] = Sample string;
logArgs[1] = Another string;
logArgs[2] = And done;
System.out.println( Array was +$m );
end

If you change dialect above to mvel the code no longer compiles.  If you
change it to mvel and use the mvel list syntax [Sample string, Another
string, And done] you don't have an array so methods requiring an array
do not work.  Concrete example: I want to log 3 values using a logging
framework.  Many logging frameworks (like sl4j) support a notation like
Logger.warn(My name is {} and you killed my {}, array); where array has
Inigo Montonya and father for values.

Thanks for any advice!
Zack


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-use-lists-in-RHS-when-using-MVEL-tp3448430p3448430.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Performance /Memory Leak Issue

2011-10-24 Thread Edson Tirelli
   I assume you are calling dispose() after using each session? Using
stateless session is an option as well.

   If so, with Drools 5.2 we had a problem with jbpm being in the classpath,
fixed in 5.3. Did you tried Drools 5.3 yet?

   To enable MBeans, just use the MBeansOption.ENABLED in the KBase
configuration, or set the system property: drools.mbeans=enabled.

   Edson

2011/10/24 arrehman arrehma...@yahoo.com

 Hi,

 Are there any instructions on how to enable JMX Beans and monitor Drools
 using JConsole or JVisualVM anywhere?

 Thanks,
 Abdul

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




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


Re: [rules-users] Drools Performance /Memory Leak Issue

2011-10-24 Thread arrehman
Hi Edson,

Yes I am calling displose().

No I have not tried 5.3 it, I will give it a shot. What was the issue with
jbpm being in the class path, is it related to memory leak over time?

AS for MBeans, thanks, I will try that also.

What I am doing now is removed all rules, putting one rule at a time back
running the performance test each time. What gives me hope is that when the
rules was reduced to one or two I do not see any memory leak or performance
issue (acceptable performance for our needs). So this gives me hope perhaps
there are one or two offending rules out there. I am not a drools expert and
I am sure some of the rules are not written in the best possible way. There
are accumulations, collections, DB calls and what not. It is painful, but I
am hopeful.  

Thanks,
Abdul


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


[rules-users] Printing rule content when a rule is fired

2011-10-24 Thread GPatel
Is is possible to get textual rule content from 
org.drools.definition.rule.Rule? What I am looking to do is get the rule 
definition (the when/then part) when a rule fires (i.e on 
AfterActivationFiredEvent) 

Thanks
G. Patel

-
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you ___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Printing rule content when a rule is fired

2011-10-24 Thread Mauricio Salatino
If you can get the name from the AfterActivationFiredEvent, you can search
in the DRL file for that content right? I don't know if there is a way to
get the content from the knowledge base, because as far as I know the
knowledge base don't save the DRL file inside it, it just get the LHS of the
rules to build the RETE tree.

Cheers

2011/10/24 gpa...@tsys.com

 Is is possible to get textual rule content from
 org.drools.definition.rule.Rule? What I am looking to do is get the rule
 definition (the when/then part) when a rule fires (i.e on
 AfterActivationFiredEvent)

 Thanks
 G. Patel - The information
 contained in this communication (including any attachments hereto) is
 confidential and is intended solely for the personal and confidential use of
 the individual or entity to whom it is addressed. If the reader of this
 message is not the intended recipient or an agent responsible for delivering
 it to the intended recipient, you are hereby notified that you have received
 this communication in error and that any review, dissemination, copying, or
 unauthorized use of this information, or the taking of any action in
 reliance on the contents of this information is strictly prohibited. If you
 have received this communication in error, please notify us immediately by
 e-mail, and delete the original message. Thank you
 ___
 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.jugargentina.org
 - 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


Re: [rules-users] Regarding BPEL

2011-10-24 Thread Mauricio Salatino
No problem Sumeet,
Feel free to open new threads if you have more questions, I'm really
passionate about these topics so I'm always open to discussions.

Cheers

On Mon, Oct 24, 2011 at 6:45 AM, Sumeet Karawal sumeet.kara...@tcs.comwrote:

 Thank you. This was really helpful.

 Regards,
 Sumeet
 Mailto: sumeet.kara...@tcs.com



  From:   Mauricio Salatino sala...@gmail.com

  To: Rules Users List rules-users@lists.jboss.org

  Date:   10/21/2011 04:15 PM

  Subject:Re: [rules-users] Regarding BPEL

  Sent by:rules-users-boun...@lists.jboss.org






 Definitely we are not in the same page :)
 BPMN is also a semi-structured language to define business processes (BP
 from BPEL and BPMN). The version 2 of the standard defines the language and
 the execution semantic for defining Business Processes with a wider scope
 than BPEL. Of course that BPEL and BPMN are not the same, but I think that
 you can achieve most of the things that you want to achieve with BPEL with
 BPMN (I'm not sure what are you trying to achieve, but we can discuss that
 in another thread). In the case of BPMN, Drools is not the one responsible
 for the process execution and jBPM5 is. Where jBPM5 is right now a former
 module of the Drools Project. jBPM5 provides you a generic process engine
 capable of understanding more than one process definition language, but
 right now the project is focused on running BPMN models. In other words,
 jBPM5 is capable of running BPEL process, but right now the parsers for the
 BPEL models are not in place. Most of the BPMS vendors are adopting BPMN as
 a defacto notation and I think that for that reason jBPM5 is only focused
 in this language now.

 Hope it helps..

 Cheers



 On Thu, Oct 20, 2011 at 2:18 PM, Jamie js...@llbean.com wrote:
  I'm not sure your answer directly addresses the question.  BPMN and BPEL
  aren't the same thing - BPMN is an unstructured diagramming notation that
  an
  be directly executed from within Drools, where as BPEL is a
  semi-structured
  language.  While most BPMN flows can be translated to BPEL, not
  everything
  in BPMN can be represented in BPEL.  I don't believe that Drools can
  directly execute BPEL (but I'm sure others will correct me if I'm wrong
  about that)

  --
  View this message in context:

 http://drools.46999.n3.nabble.com/rules-users-Regarding-BPEL-tp3437430p3438367.html

  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users



 --
  - CTO @ http://www.plugtree.com
  - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jugargentina.org
  - 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




 =-=-=
 Notice: The information contained in this e-mail
 message and/or attachments to it may contain
 confidential or privileged information. If you are
 not the intended recipient, any dissemination, use,
 review, distribution, printing or copying of the
 information contained in this e-mail message
 and/or attachments to it are strictly prohibited. If
 you have received this communication in error,
 please notify us by reply e-mail or telephone and
 immediately and permanently delete the message
 and any attachments. Thank you




 ___
 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.jugargentina.org
 - 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


Re: [rules-users] Performance: StatefulKnowledgeSession.dispose()

2011-10-24 Thread Mauricio Salatino
Are you using persistence? can you give us more context about what are you
trying to achieve?
Cheers

On Mon, Oct 24, 2011 at 12:25 AM, tonytang baiyuant...@hengtiansoft.comwrote:

 I have write a very simple rule to test StatefulKnowledgeSession.dispose()
 method.

 After I call this method, I still can use this session...But the
 performance
 is almost 20 times better than no call this method.

 Technically after I call dispose() method, I can not use this session
 anymore.

 I just want to know. Why the performance is so much difference?




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




-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jugargentina.org
 - 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] 5.3.0.Final resource change scanner bug

2011-10-24 Thread lhorton
I tried loading up 5.3.0 this weekend but have run into this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=733008

my server log says:
Exception in thread Thread-38 java.lang.IllegalStateException: reader does
have a modified date
at
org.drools.io.impl.ReaderResource.getLastModified(ReaderResource.java:64)
at
org.drools.io.impl.ResourceChangeScannerImpl.scan(ResourceChangeScannerImpl.java:166)
at
org.drools.io.impl.ResourceChangeScannerImpl$ProcessChangeSet.run(ResourceChangeScannerImpl.java:311)
at java.lang.Thread.run(Thread.java:662)


some rules files loaded, but some failed (silently, except for the above
message).  Is there a workaround for this problem?  we cannot migrate to
5.3.0 unless this is fixed or there is a way to work around the problem.

thanks for any help.

--
View this message in context: 
http://drools.46999.n3.nabble.com/5-3-0-Final-resource-change-scanner-bug-tp3449420p3449420.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 5.3.0.Final resource change scanner bug

2011-10-24 Thread Michael Anstis
I think it is this problem https://issues.jboss.org/browse/GUVNOR-1699...
but no fix yet :(

On 24 October 2011 21:30, lhorton lhor...@abclegal.com wrote:

 I tried loading up 5.3.0 this weekend but have run into this bug:
 https://bugzilla.redhat.com/show_bug.cgi?id=733008

 my server log says:
 Exception in thread Thread-38 java.lang.IllegalStateException: reader
 does
 have a modified date
at
 org.drools.io.impl.ReaderResource.getLastModified(ReaderResource.java:64)
at

 org.drools.io.impl.ResourceChangeScannerImpl.scan(ResourceChangeScannerImpl.java:166)
at

 org.drools.io.impl.ResourceChangeScannerImpl$ProcessChangeSet.run(ResourceChangeScannerImpl.java:311)
at java.lang.Thread.run(Thread.java:662)


 some rules files loaded, but some failed (silently, except for the above
 message).  Is there a workaround for this problem?  we cannot migrate to
 5.3.0 unless this is fixed or there is a way to work around the problem.

 thanks for any help.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/5-3-0-Final-resource-change-scanner-bug-tp3449420p3449420.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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


Re: [rules-users] 5.3.0.Final resource change scanner bug

2011-10-24 Thread lhorton
We are not using Guvnor.  Rules are being compiled from XLS and DRL files
source files in change sets.  I'm just mentioning this FYI.  Some of the
rules files compile and load but some do not.  I don't see anything in the
logs to tell me which file(s) are failing.

--
View this message in context: 
http://drools.46999.n3.nabble.com/5-3-0-Final-resource-change-scanner-bug-tp3449420p3449514.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 5.3.0.Final resource change scanner bug

2011-10-24 Thread Michael Anstis
Sorry Lisa, I should have remembered you don't use Guvnor. I assume all
rules compile ok without use of a change-set? Is it possible to put together
a test case and open a JIRA? This sounds like something new.

sent on the move

On 24 Oct 2011 22:02, lhorton lhor...@abclegal.com wrote:

 We are not using Guvnor.  Rules are being compiled from XLS and DRL files
 source files in change sets.  I'm just mentioning this FYI.  Some of the
 rules files compile and load but some do not.  I don't see anything in the
 logs to tell me which file(s) are failing.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/5-3-0-Final-resource-change-scanner-bug-tp3449420p3449514.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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


Re: [rules-users] 5.3.0.Final resource change scanner bug

2011-10-24 Thread lhorton
Yes, all compile ok without change set (our tests compile the rules in code,
but our server compiles using knowledge agent).  I had to roll everything
back to 5.2 for our developers, but I'll find some time tomorrow to try
things out with 5.3 again.  I'll see if I can narrow it down to specific
file(s) that fail compilation.

--
View this message in context: 
http://drools.46999.n3.nabble.com/5-3-0-Final-resource-change-scanner-bug-tp3449420p3449655.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] 5.3.0.Final resource change scanner bug

2011-10-24 Thread Michael Anstis
Thanks Lisa, I appreciate it is a pain for you but your help is much
appreciated.

sent on the move

On 24 Oct 2011 23:03, lhorton lhor...@abclegal.com wrote:

 Yes, all compile ok without change set (our tests compile the rules in
 code,
 but our server compiles using knowledge agent).  I had to roll everything
 back to 5.2 for our developers, but I'll find some time tomorrow to try
 things out with 5.3 again.  I'll see if I can narrow it down to specific
 file(s) that fail compilation.

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/5-3-0-Final-resource-change-scanner-bug-tp3449420p3449655.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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


Re: [rules-users] Printing rule content when a rule is fired

2011-10-24 Thread GPatel
I wish the Rule definition gave more detail than just a rule name, package 
name and metadata, or there was some way through the KBase api to get to 
it. Seems like I will need the to fetch the rule content from guvnor via 
REST (via some sort of timestamp versioning of my own)

Thanks
G. Patel



From:   Mauricio Salatino sala...@gmail.com
To: Rules Users List rules-users@lists.jboss.org
Date:   10/24/2011 01:24 PM
Subject:Re: [rules-users] Printing rule content when a rule is 
fired
Sent by:rules-users-boun...@lists.jboss.org



If you can get the name from the AfterActivationFiredEvent, you can search 
in the DRL file for that content right? I don't know if there is a way to 
get the content from the knowledge base, because as far as I know the 
knowledge base don't save the DRL file inside it, it just get the LHS of 
the rules to build the RETE tree.

Cheers

2011/10/24 gpa...@tsys.com
Is is possible to get textual rule content from 
org.drools.definition.rule.Rule? What I am looking to do is get the rule 
definition (the when/then part) when a rule fires (i.e on 
AfterActivationFiredEvent) 

Thanks 
G. Patel - The information 
contained in this communication (including any attachments hereto) is 
confidential and is intended solely for the personal and confidential use 
of the individual or entity to whom it is addressed. If the reader of this 
message is not the intended recipient or an agent responsible for 
delivering it to the intended recipient, you are hereby notified that you 
have received this communication in error and that any review, 
dissemination, copying, or unauthorized use of this information, or the 
taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message. 
Thank you 
___
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.jugargentina.org
 - 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] Using Drools Flow with Multiple Fact Types

2011-10-24 Thread Jason
I'm a relatively new user to Flows, but I have worked with a colleague to
instantiate flows that control a sequence of rule sets being applied to a
set of data in a meaningful order (e.g. I do pruning to limit the set of
facts as a first step, then generate sets of hypotheses, then score the
hypotheses and select the highest-scoring instance as a winner), so I do
have some experience and a baseline working Flow that is successfully
operating.

My next big challenge is to try to use Drools Flow to control which sets of
rules will be applied to which subsets of data - this goes beyond the uses I
have put it to before, which was just to control the single ordering of rule
sets that was then applied to all data.

My question has to do with the syntax of fact constraints used for
controlling flow, and how to control the flow using constraints that reflect
data characteristics when there are many different fact types that will be
going through the Flow.  I will use an analogy to the actual problem to make
it a little simpler to describe.

What I want to do is to apply different rules based on the Program that a
particular Customer belongs to.  If a customer is part of Program A, then I
want to apply RuleSet A, and if the Customer belongs to Program B then I
want to apply a different set of rules, RuleSet B.  

My problem is twofold:

1.)  I have not been able to demonstrate constraints working as I expected,
even when I simplified the data flow to its most basic form.  The 'debug'
version of the flow that I created has a diverging OR gateway (specifically
OR, not an XOR gateway) with two criteria; the first is always true and
therefore all instances should result in an instance of LogStatementA, and
the second one has a constraint on the UserID associated with the customer
and thereby limits the set that should be exposed to a rule that generates
an instance of LogStatementB:  Customer(userId  100) as an example of
something I've tried, where any Customers with a UserID above 100 would then
trigger an instance of both LogStatementA and LogStatementB, while customers
with a UserID = 100 would only trigger an instance of LogStatementA.

What I find is that if I set the constraint such that at least one Customer
instance in the data should trigger the selection, then ALL of the instances
of Customer in the data end up triggering an instance of LogStatementB (even
those instances that do not individually meet the constraint), while if I
set the constraint such that none of the Customer instances meets it, I get
zero instances of LogStatementB.  In both cases, I get an instance of
LogStatementA for each Customer (as expected).

I don't understand why the existence of a single match to the Flow Control
rule (Customer(userId100)) would trigger all instances of Customers
(including those with UserID's less than 100) to be routed to that path,
while having no matching instances correctly avoids sending any Customers
down this path.

Is there a common type of error that I might have perpetrated that would
cause this?  I have tried a variety of combinations of the Type: and
Dialect: settings, though intuitively it seems like Type: Rule and
Dialect:mvel are correct given that I'm formulating the constraint as
Customer(userId100).  Also, if I introduce a typo in either the Customer
or userId elements of the rule, I get errors that make it clear the POJO for
this constraint is definitely being correctly imported.

2.)  Assuming there is a fix to the underlying issue I'm seeing in #1, I
will want to extend this example so that I am pushing more than just
instances of Customer through my Flow.  In particular, the rules that i want
to expose the data to after the diverging gateway represent different
flavors of the same type of logic, so what I want in the end is for all
Customer facts to be sent either one way or the other, and all non-Customer
facts to be sent BOTH ways.  This will allow me, for instance, to apply
different thresholds to customers depending on which Program they are part
of.

I first formulated an attempt at the control rule for this as:
Customer(userId100) or not Customer
with the idea that if the data coming through the flow is an instance of a
Customer, then I want the constraint to be applied to determine if it
proceeds down this flow, but if the data is not an instance of Customer then
I always want it to proceed down the path (e.g. all Account instances, all
RewardThreshold instances, etc.).  

Is this a valid way to expect to use Drools Flow?  In the examples I've
seen, there is only a single type of object that is going through a flow -
am I breaking the spirit of Drools Flow in trying to get multiple types of
facts flowing through?

Assuming I'm not committing heresy in this basic desire of what I'm trying
to do, is there an example anywhere of what the appropriate syntax for this
kind of constraint would/could be?  Any of the variants I have tried (and
believe me, I've tried a bunch) have resulted 

Re: [rules-users] Performance: StatefulKnowledgeSession.dispose()

2011-10-24 Thread tonytang
I found the problem:
This is because I use log:
KnowledgeRuntimeLogger logger =
KnowledgeRuntimeLoggerFactory.newFileLogger(session, test);

If I use Stateful session, The rule engine will print many log in XML file.
But if i use stateless session, it will not print any log.

my code is like this one:
for(int i = 0; i  100; i ++){
session.insert(new Object())// 
session.fireAllrules();
}
session.dispose();

If I send 1,000,000 message, it will generate hundreds xml format log files.


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


Re: [rules-users] Drools Performance /Memory Leak Issue

2011-10-24 Thread arrehman
HI,

There was one bad rule, when I removed that memory leak is gone and the
performance improved drastically!!! (from 60 sec for 1000 records to 10
seconds, satisfies our requirements)  I am not sure what is wrong with the
rule, I will check that tomorrow, I am a happy man now. 

Abdul

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