Re: [rules-users] Could anyone suggest alternate approach

2009-11-24 Thread Wolfgang Laun
OK, thanks for checking!
-W
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Rule Templates - Docs Examples?

2009-11-24 Thread Wolfgang Laun
An extensive rewrite of the section dealing with Templates was done in
the early stages of 5.0, and it ought to be available with current
snapshot releases. The relevant section is 5.2, Templates.

-W






On 11/24/09, Adam Rinehart adam.rineh...@gmail.com wrote:
 I am trying to research using a rule template driven by data from a
 spreadsheet, rather than using a straight decision table.

 I understand I need to use the ExternalSpreadsheetCompiler but am finding a
 distressing lack of information about the template format.

 The 5.0 docs seem to have mistakes; the code example for that section looks
 to have been cut  pasted from another section and does not match the text
 description of what is going on.

 Using google, the best I could find was a blog posting from Steven Williams
 on Aug 26, 2008: http://blog.athico.com/2008/08/drools-rule-templates.html

 In this blog posting, he said it was the first of 3 examples from the
 drools-examples project. But I could not find any additional blog postings
 by him on this subject.

 Does anyone know of additional documentation or examples on how rule
 templates work?

 Specifically, how to do optional columns, and array columns, similar to how
 the built in decision tables feature works?

 Adam

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


Re: [rules-users] Query on performance when adding/removing rules

2009-11-24 Thread DeepakA

any suggestions regarding the impact on performance???



DeepakA wrote:
 
 We have a set of rules (lets call them old rules) running in our strategy
 server.
 A new requirement is that - the client can make calls to the server, at
 that point new rules need to be loaded in the workin memory (at run time),
 if the rules get executed then the rules need to be removed from the
 WorkinMemory (after the consequence section is executed)
 
 I would like to know if repeated adding and removing of rules in the
 working memory will lead to performance issues?
 
 i.e. when the new rules are added/removed the old-set-of rules will still
 be evaluated in the background, will this hamper performance?
 

-- 
View this message in context: 
http://old.nabble.com/Query-on-performance-when-adding-removing-rules-tp26475542p26493210.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] Problems debugging on Eclipse 3.5

2009-11-24 Thread Leonardo Gomes
Hi Guys,

I'm having the following exception while trying to lauch Debug as Drools
JUnit Test:

FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=JVMTI_ERROR_INTERNAL(113)
ERROR: transport error 202: connect failed: Connection refused
[transport.c,L41]
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
[debugInit.c,L500]
JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initialized


I'm using:

* Eclipse 3.5.0
* Drools Eclipse Plugin 5.0.1
* jdk1.5.0_18


Any ideas?

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


[rules-users] Deploy Guvnor on websphere

2009-11-24 Thread Ambika Goel
Hi All,

I am trying to deploy Guvnor on Websphere v6.1.

But I am getting the following error:

WebApp E Exception caught while initializing context
java.lang.RuntimeException: Could not create Component: assetLockManager
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1155)
at 
org.jboss.seam.init.Initialization.installComponents(Initialization.java:1071)
at org.jboss.seam.init.Initialization.init(Initialization.java:720)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at 
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:652)
at 
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:354)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:292)
at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)


Can anyone help me on this?

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


Re: [rules-users] DrlParser not supporting temporal operators

2009-11-24 Thread Lucas Amador

Hi,
XML rule format wasn't updated to drools 5 new operators, because the  
lack of interest of the users



Sent from my phone

El 24/11/2009, a las 05:21, Swapnil Raverkar  
swapnil.raver...@gmail.com escribió:




Can anyone help me with this?


Cheers,

Swapnil

2009/11/21 Swapnil Raverkar swapnil.raver...@gmail.com

Thanks Edson. That worked.

But the problem is that if i am using a temporal operator condition  
as: this before[5s, 0s] $res


the equivalent XML generated is as follows:

field-constraint field-name=this
   variable-restriction evaluator=before identifier=$res /
/field-constraint

over here [5s,0s] information is getting lost in the transformation.

Is there any fix for this?


Cheers,

Swapnil

2009/11/21 Edson Tirelli ed.tire...@gmail.com


All operators in drools are pluggable. Whenever you use the  
KnowledgeBuilder to parse/compile rules, it will automatically build  
a static registry of available operators for the parser, but if you  
use the lower level parser API, you need to register the operators  
by yourself. Just write the following line of code, before parsing  
anything:


   new EvaluatorRegistry();

   This will statically initialize the registry with the operators  
shipped with Drools. If you create your own operators, you can add  
them to the cache by doing:


   EvaluatorRegistry registry = new EvaluatorRegistry();
   registry.addEvaluatorDefinition( new MyEvaluatorDefinition() );

   []s
   Edson


2009/11/20 Swapnil Raverkar swapnil.raver...@gmail.com

I am trying to dump an XML equivalent of a DRL file using DrlParser  
 XMLOutputter.


But when my rules file has rules with temporal operators  
DrlParser.parser(inputStream) throws a NullPointerException.


Why DrlParser is not supporing temporal operators yet?


Cheers,

Swapnil

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




--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com

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



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


[rules-users] Drools 5.0 Guvnor install

2009-11-24 Thread SzA84

Hi!

I have a problem. I installed the Drools 5.0 Guvnor Standalone with with
JBoss AS from http://www.jboss.org/drools/downloads.html


I read this tutorial:
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-guvnor/html_single/index.html#d0e85

And it says you should navigate to http://localhost/drools-jbrms and check
that Guvnor appears, but it doesn't work, although the server is running.

Can anyone help me on this?

Thanks!

-- 
View this message in context: 
http://old.nabble.com/Drools-5.0-Guvnor-install-tp26494839p26494839.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 5.0 Guvnor install

2009-11-24 Thread সাহিদ
On Tue, Nov 24, 2009 at 5:40 PM, SzA84 szepesiand...@citromail.hu wrote:
 And it says you should navigate to http://localhost/drools-jbrms and check
 that Guvnor appears, but it doesn't work, although the server is running.


I think request url should be http://localhost/drools-guvnor


-- 
S.
Argue with idiots, and you become an idiot. - PG
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.0 Guvnor install

2009-11-24 Thread Qian, Tony
I had some issue. The instruction says you need to replace a few jars files 
(you can download it from Drools web site). But I still cannot make it work 
(GlassFish). I used standalone right now.

There are two books out there. Can anyone tell us which one is better or covers 
most recent features in 5.0? Also, I'm looking for examples of using RestFul 
Web Service (both Java and Perl). Any help is really appreciated.

Thanks,
Tony

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Sahid Khan (?)
Sent: Tuesday, November 24, 2009 7:21 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5.0 Guvnor install

On Tue, Nov 24, 2009 at 5:40 PM, SzA84 szepesiand...@citromail.hu wrote:
 And it says you should navigate to http://localhost/drools-jbrms and check
 that Guvnor appears, but it doesn't work, although the server is running.


I think request url should be http://localhost/drools-guvnor


--
S.
Argue with idiots, and you become an idiot. - PG
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

HR
font size=1 face=ArialBCONFIDENTIALITY NOTICE: /BThe information in 
this electronic transmission and
any documents accompanying it may contain confidential and privileged
information intended for use by the individual or entity that is the intended
recipient. If you have received this message in error or due to an unauthorized
transmission or interception, please delete all copies from your system without
disclosing, copying, or transmitting this message and notify us by telephone
877TELLUS9 or by electronic mail a href = 
servicecomme...@progressive-medical.comservicecomme...@progressive-medical.com/a./font


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


Re: [rules-users] Rule Templates - Docs Examples?

2009-11-24 Thread Adam Rinehart
Looking at the 5.1 snapshots, these sections have not been updated since the
5.0 release. I'm looking at a 5.1 snapshot I downloaded on 11/2/09.

The relevent sections, specifically 5.1.7 and 5.2, seem to have errors
and/or omissions and those sections should have the information I'm looking
for. Unfortunately I don't know what the correct info should be, so I can't
submit an edit myself.

As an example, from the last part of 5.1.7:
snip

The code to run this is simple:

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
DecisionTableConfiguration dtconf =
KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtconf.setInputType( DecisionTableInputType.XLS );
dtconf.setWorksheetName( Tables_2 );
kbuilder.add( ResourceFactory.newInputStreamResource( getSpreadsheetStream() ),
  ResourceType.DTABLE,
  dtconf );

CollectionKnowlegePackage kpkg = kbuilder.getKnowlegePackages();

We create an ExternalSpreadsheetCompiler object and use it to merge the
spreadsheet with the rules. The two integer parameters indicate the column
and row where the data actually starts - in our case column 2, row 2 (i.e.
B2)

/snip

The docs discuss creating an ExternalSpreadsheetCompiler in the example to
merge the spreadsheet with the rules template, but the example is for a
standard DecisionTable, without a custom template.

In section 5.2, it goes over templates, but does not discussion optional
values or array values.

I have reviewed the Drools-Example files. There is an example in there of
using array values, but not an example using optional values, which is what
I particularly need.


On Tue, Nov 24, 2009 at 1:17 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote:

 An extensive rewrite of the section dealing with Templates was done in
 the early stages of 5.0, and it ought to be available with current
 snapshot releases. The relevant section is 5.2, Templates.

 -W






 On 11/24/09, Adam Rinehart adam.rineh...@gmail.com wrote:
  I am trying to research using a rule template driven by data from a
  spreadsheet, rather than using a straight decision table.
 
  I understand I need to use the ExternalSpreadsheetCompiler but am finding
 a
  distressing lack of information about the template format.
 
  The 5.0 docs seem to have mistakes; the code example for that section
 looks
  to have been cut  pasted from another section and does not match the
 text
  description of what is going on.
 
  Using google, the best I could find was a blog posting from Steven
 Williams
  on Aug 26, 2008:
 http://blog.athico.com/2008/08/drools-rule-templates.html
 
  In this blog posting, he said it was the first of 3 examples from the
  drools-examples project. But I could not find any additional blog
 postings
  by him on this subject.
 
  Does anyone know of additional documentation or examples on how rule
  templates work?
 
  Specifically, how to do optional columns, and array columns, similar to
 how
  the built in decision tables feature works?
 
  Adam
 
 ___
 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] unable to resolve Type Declaration class

2009-11-24 Thread richarda

So, my code is doing this:
 
 KnowledgeBaseConfiguration conf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
conf.setOption(EventProcessingOption.STREAM);
KnowledgeBuilder builder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
try {
File f = new File(/tmp/my.pkg);
InputStream stream = new FileInputStream(f);
if (stream == null) {
jlog.fatal(Unable to find rule pkg);
} else {
jlog.info(adding pkg);
   
builder.add(ResourceFactory.newInputStreamResource(stream),
ResourceType.PKG);
}
} catch (Exception e) {
e.printStackTrace();
}
KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase(conf);
kbase.addKnowledgePackages(builder.getKnowledgePackages());
jlog.info(setup creating knowledge session);
ksession = kbase.newStatefulKnowledgeSession();
jlog.info( setup ksession created);


The pkg was created from Guvnor.

If in the package declaration area in Guvnor,  (where you put the import
statements)
If I put
declare Signature
 @role ( event )
end

then build the package, save it to disk /tmp/my.pkg
on startup I get:

[#|2009-11-24T14:50:38.944+|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=12;_ThreadName=pool-1-thread-3;_RequestID=7c35064d-757e-4519-b5eb-433db89e168d;|org.drools.RuntimeDroolsException:
unable to resolve Type Declaration class 'Signature'
at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:754)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:515)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)


I need to declare 'Signature' as an 'event'
Am I doing this wrong?

If I do this all in Eclipse and load the DRL files manually it all works.
-- 
View this message in context: 
http://old.nabble.com/unable-to-resolve-Type-Declaration-class-tp26497326p26497326.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] unable to resolve Type Declaration class

2009-11-24 Thread Edson Tirelli
   Do you have the import for your signature class?

import my.package.Signature

Edson

2009/11/24 richarda richard.ambri...@gmail.com


 So, my code is doing this:

  KnowledgeBaseConfiguration conf =
 KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
conf.setOption(EventProcessingOption.STREAM);
KnowledgeBuilder builder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
try {
File f = new File(/tmp/my.pkg);
InputStream stream = new FileInputStream(f);
if (stream == null) {
jlog.fatal(Unable to find rule pkg);
} else {
jlog.info(adding pkg);

 builder.add(ResourceFactory.newInputStreamResource(stream),
 ResourceType.PKG);
}
} catch (Exception e) {
e.printStackTrace();
}
KnowledgeBase kbase =
 KnowledgeBaseFactory.newKnowledgeBase(conf);
kbase.addKnowledgePackages(builder.getKnowledgePackages());
jlog.info(setup creating knowledge session);
ksession = kbase.newStatefulKnowledgeSession();
jlog.info( setup ksession created);


 The pkg was created from Guvnor.

 If in the package declaration area in Guvnor,  (where you put the import
 statements)
 If I put
 declare Signature
  @role ( event )
 end

 then build the package, save it to disk /tmp/my.pkg
 on startup I get:


 [#|2009-11-24T14:50:38.944+|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=12;_ThreadName=pool-1-thread-3;_RequestID=7c35064d-757e-4519-b5eb-433db89e168d;|org.drools.RuntimeDroolsException:
 unable to resolve Type Declaration class 'Signature'
at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:754)
at

 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:515)
at

 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)


 I need to declare 'Signature' as an 'event'
 Am I doing this wrong?

 If I do this all in Eclipse and load the DRL files manually it all works.
 --
 View this message in context:
 http://old.nabble.com/unable-to-resolve-Type-Declaration-class-tp26497326p26497326.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 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] unable to resolve Type Declaration class

2009-11-24 Thread richarda

Yes


Edson Tirelli-4 wrote:
 
Do you have the import for your signature class?
 
 import my.package.Signature
 
 Edson
 
 2009/11/24 richarda richard.ambri...@gmail.com
 

 So, my code is doing this:

  KnowledgeBaseConfiguration conf =
 KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
conf.setOption(EventProcessingOption.STREAM);
KnowledgeBuilder builder =
 KnowledgeBuilderFactory.newKnowledgeBuilder();
try {
File f = new File(/tmp/my.pkg);
InputStream stream = new FileInputStream(f);
if (stream == null) {
jlog.fatal(Unable to find rule pkg);
} else {
jlog.info(adding pkg);

 builder.add(ResourceFactory.newInputStreamResource(stream),
 ResourceType.PKG);
}
} catch (Exception e) {
e.printStackTrace();
}
KnowledgeBase kbase =
 KnowledgeBaseFactory.newKnowledgeBase(conf);
kbase.addKnowledgePackages(builder.getKnowledgePackages());
jlog.info(setup creating knowledge session);
ksession = kbase.newStatefulKnowledgeSession();
jlog.info( setup ksession created);


 The pkg was created from Guvnor.

 If in the package declaration area in Guvnor,  (where you put the import
 statements)
 If I put
 declare Signature
  @role ( event )
 end

 then build the package, save it to disk /tmp/my.pkg
 on startup I get:


 [#|2009-11-24T14:50:38.944+|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=12;_ThreadName=pool-1-thread-3;_RequestID=7c35064d-757e-4519-b5eb-433db89e168d;|org.drools.RuntimeDroolsException:
 unable to resolve Type Declaration class 'Signature'
at
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:754)
at

 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:515)
at

 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)


 I need to declare 'Signature' as an 'event'
 Am I doing this wrong?

 If I do this all in Eclipse and load the DRL files manually it all works.
 --
 View this message in context:
 http://old.nabble.com/unable-to-resolve-Type-Declaration-class-tp26497326p26497326.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 by Red Hat @ www.jboss.com
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 

-- 
View this message in context: 
http://old.nabble.com/unable-to-resolve-Type-Declaration-class-tp26497326p26498232.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] Does Session effeciently filter unused facts, or...

2009-11-24 Thread Greg Barton
Well, I was about to say you could do this using rule inheritance but there 
is a caveat, and possibly a bug.  It almost works. :)

Try this:

rule BaseStream1Criteria
enabled false
when
m : Message( foo == BAR ) from entry-point Stream1
then
System.out.println( BaseStream1Criteria );
end

rule SubRule1 extends BaseStream1Criteria
when
Message( status == Message.HELLO ) from m;
then
System.out.println( SubRule1  );
end

rule BaseStream2Criteria
enabled false
when
m : Message( foo == BAS ) from entry-point Stream2
then
System.out.println( BaseStream2Criteria );
end

rule SubRule2 extends BaseStream2Criteria
when
Message( status == Message.HELLO ) from m;
then
System.out.println( SubRule2  );
end

Basically, define one rule for each entry point that has the global criteria 
for that entry point.  Then extend that rule.

The caveat is that it seems you can't use the events matched in the super-rule 
in the RHS of the subrule. (Try putting the object m matched into the action 
of either of the subrules.  It neither validates in eclipse nor compiles at 
runtime, drools 5.0.1.)  If this isn't fixed in trunk (I can't check at the 
moment) I'll open a jira.

Code attached.  When you run it, this should be the output:

SubRule2 
SubRule1

--- On Mon, 11/23/09, Barry Kaplan grou...@memelet.com wrote:

 From: Barry Kaplan grou...@memelet.com
 Subject: [rules-users]  Does Session effeciently filter unused facts, or...
 To: rules-users@lists.jboss.org
 Date: Monday, November 23, 2009, 9:12 PM
 
 ... should I put a filter before insert(). 
 
 I will have lots of events coming from hardware devices,
 only some of which
 be applicable to a given session instance. I've tried
 extracting the
 declared types from the packages, but that doesn't include
 classes used in
 patterns which where only imported. So determine the actual
 set of event
 classes used by a given set of packages seems not to be so
 easy.
 
 I've drilled down to EntryPointNode.assertObject..
 -- 
 View this message in context: 
 http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26489782.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



  

DroolsTest.java
Description: Binary data


Sample.drl
Description: Binary data
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.0 Guvnor install

2009-11-24 Thread SzA84

Unfortunately that isn't good too.

But I see this message:
19:27:20,921 INFO  [AprLifecycleListener] The Apache Tomcat Native library
which allows optimal performance in production environments was not found on
the java.library.path
I don't know what is it exactly, but may be this is the problem?


Sahid Khan (সাহিদ) wrote:
 
 On Tue, Nov 24, 2009 at 5:40 PM, SzA84 szepesiand...@citromail.hu wrote:
 And it says you should navigate to http://localhost/drools-jbrms and
 check
 that Guvnor appears, but it doesn't work, although the server is
 running.

 
 I think request url should be http://localhost/drools-guvnor
 
 
 -- 
 S.
 Argue with idiots, and you become an idiot. - PG
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Drools-5.0-Guvnor-install-tp26494839p26499921.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] Guvnor 5.1 fix questions

2009-11-24 Thread Robert Morse
Any idea if the patch to handle agenda-groups within decision tables will be 
applied to 5.1, and if it will deploy cleanly (without ACL errors) to JBoss 5.x?


The human mind is an iterative processor, it never does anything right the 
first time.  What it does well is to make improvements on every iteration 
(deMarco)




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


[rules-users] Refreshing rules

2009-11-24 Thread Lindy hagan
I am loading rules from database and it can be updated using GUI. Can
KnowledgeAgent be used to refresh rules?

KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( MyAgent
);
kagent.applyChangeSet( ResourceFactory.newInputStreamResource(stream));
KnowledgeBase kbase = kagent.getKnowledgeBase();
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Stateful session and non-existence of Facts

2009-11-24 Thread Leonardo Gomes
Hello,

Regarding the session recreation, you're absolutely right, thanks!

Anyway, I still have a problem and I believe it's more a design thing. Let
me try to clarify it.

I have different types of facts, let's say:

* Types: FactA, FactB, FactC;
* A stateful session with rules operating on them;
* And a global variable, called output, which is a list of messages
generated as consequences of those rules;
* From time to time, I get notified that a fact of type FactA changed, then
I have to:
  - retract all facts of type FactA from my working memory
  - reload them from the database (with java beans being created)
  - reinsert them in that stateful session

Now, let's say FactA(1) indicates a fact of type FactA and id = 1.

- Then, in the beginning, I insert FactA(1) and FactA(2) in my working
memory and fire the rules.
- I have several rules operating on different types of facts, but I'm
interested in one rule in particular which operates against FactA and reads
something like:

rule test non existence
when
not FactA( id == 4 )
then
output.add(there's no FactA id 4);

- This rule is fired and the message is added to my output object.

Later on, I have a notification that a FactA has changed, then I:
- retract all FactAs from my working memory
- clear all FactA-related messages from my output object
- reload FactAs (let's say now I have FactA(1), FactA(3), but NOT FactA(4))
- reinsert them in the WM
- fire the rules

The rule that checks that there's no FactA(4) doesn't refire. All other
rules operating against FactA do, and since I had removed all FactA-related
messages from my output object, this time I don't get the there no FactA id
4 message in my output.

It sounds like a situation for a stateless session, but I actually have
several different rules, operating on different types of facts and don't
want to refire all rules, just because a fact of type A changed.

Maybe I should have an strategy of creating different sets of stateless
sessions. I'm not sure. Advice is really welcome!

Thanks again.

Leo.










2009/11/17 Edson Tirelli ed.tire...@gmail.com


Leonardo,

First, I believer there is a misconception in your reasoning: creating
 sessions is supposed to be much much cheaper than retracting all facts.
 Creating a rulebase is heavier, because it requires compilation, but
 creating a session is supposed to be very light by design. So, first thing
 you should do is change that.

Regarding your question, if you insert:


 SiteLanguage(language : languageCode)
 t : SiteSpecialServiceType(type : specialServiceType)

The rule will activate and fire. If you don't, then the rule will not
 match. That is how it is supposed to work.

Edson

 2009/11/17 Leonardo Gomes leonardo.f.go...@gmail.com

 Hi Guys,

 I have the following situation while running a stateful session with
 Drools 4.0.7:

 - I want to test that a fact with a given state doesn't exist;
 - It works fine
 - At a certain point I have to retract all facts and reinsert them at the
 stateful session - some of them actually changed and I don't want to
 recreate the session b/c it's expensive
 - Again the fact that didn't exist when I first created the session still
 doesn't exist

 ** Problem: This time the rule that verified the non-existence is not
 fired because I didn't insert any fact that would retrigger it.

 Rule example:

 rule 022

 when

 SiteLanguage(language : languageCode)
 t : SiteSpecialServiceType(type : specialServiceType)
 not SiteLanguageSpecialServiceType(specialServiceType == type,
 languageCode == language)
 then
 consequence
 end

 How could I solve or workaround that?


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




 --
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com

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


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


Re: [rules-users] Does Session effeciently filter unused facts, or...

2009-11-24 Thread Barry Kaplan

Greg, I'm not following how this is related to my question. Probably I was
unclear.

Suppose I have 1000 event types/classes, but rules that use only 50 types in
LHS patterns. I will be receiving events of random types at say 100hz. The
question is whether I should just insert the events regardless of whether
any rule actually uses the instances' event type (because the rete-oo will
filter out the unused types very quickly) or whether I should add a filter
before sesssion.insert(..) to let only those types of events that are
actually used by a rule.

My second problem/question then becomes: How to determine which
types/classes are actually used in LHS patterns for a given package? By this
I mean, how can I write code to make this determination.
-- 
View this message in context: 
http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26505340.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] Does Session effeciently filter unused facts, or...

2009-11-24 Thread Edson Tirelli
   Greg, I believe I fixed this bug in trunk a few weeks ago. Although I
confess I did not understood the intent of your rules... :)

   Barry, you can certainly go either way. Rete is very efficient on
filtering fact types, but of course there is some overhead on fact handle
creation. If performance is acceptable for you by just inserting events and
letting the engine discard them automatically when not used, I would not
worry about. If you are having performance problems due to the volumes of
non-interesting events and you want to try pre-filtering, I can give you
some pointers on how to find the fact types used by your rules/queries. In
this case, we might even make a feature of that and have the pre-filter
being executed by the engine... ;)

   Edson

2009/11/24 Greg Barton greg_bar...@yahoo.com

 Well, I was about to say you could do this using rule inheritance but
 there is a caveat, and possibly a bug.  It almost works. :)

 Try this:

 rule BaseStream1Criteria
enabled false
when
m : Message( foo == BAR ) from entry-point Stream1
then
System.out.println( BaseStream1Criteria );
 end

 rule SubRule1 extends BaseStream1Criteria
when
Message( status == Message.HELLO ) from m;
then
System.out.println( SubRule1  );
 end

 rule BaseStream2Criteria
enabled false
when
m : Message( foo == BAS ) from entry-point Stream2
then
System.out.println( BaseStream2Criteria );
 end

 rule SubRule2 extends BaseStream2Criteria
when
Message( status == Message.HELLO ) from m;
then
System.out.println( SubRule2  );
 end

 Basically, define one rule for each entry point that has the global
 criteria for that entry point.  Then extend that rule.

 The caveat is that it seems you can't use the events matched in the
 super-rule in the RHS of the subrule. (Try putting the object m matched
 into the action of either of the subrules.  It neither validates in eclipse
 nor compiles at runtime, drools 5.0.1.)  If this isn't fixed in trunk (I
 can't check at the moment) I'll open a jira.

 Code attached.  When you run it, this should be the output:

 SubRule2
 SubRule1

 --- On Mon, 11/23/09, Barry Kaplan grou...@memelet.com wrote:

  From: Barry Kaplan grou...@memelet.com
  Subject: [rules-users]  Does Session effeciently filter unused facts,
 or...
  To: rules-users@lists.jboss.org
  Date: Monday, November 23, 2009, 9:12 PM
 
  ... should I put a filter before insert().
 
  I will have lots of events coming from hardware devices,
  only some of which
  be applicable to a given session instance. I've tried
  extracting the
  declared types from the packages, but that doesn't include
  classes used in
  patterns which where only imported. So determine the actual
  set of event
  classes used by a given set of packages seems not to be so
  easy.
 
  I've drilled down to EntryPointNode.assertObject..
  --
  View this message in context:
 http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26489782.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




-- 
 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] Does Session effeciently filter unused facts, or...

2009-11-24 Thread Edson Tirelli
   Thinking a bit more about it, if the rules author does not care about a
given event type, he will probably not even declare that event type with
@role( event ), meaning the engine will not discard it automatically. By
default the engine will keep this facts around until retracted because at
some point in the future the user might dynamically add rules that match
them, what is clearly not your case...

So, for your problem, I believe pre-filtering is probably your best
option with released versions of Drools. For future versions, I think we
should add a kbase configuration option to tell the engine what to do in
case of facts that don't match any rule: either keep them (as it does today)
or discard them right away. What do you think?

Edson

2009/11/24 Barry Kaplan grou...@memelet.com


 Greg, I'm not following how this is related to my question. Probably I was
 unclear.

 Suppose I have 1000 event types/classes, but rules that use only 50 types
 in
 LHS patterns. I will be receiving events of random types at say 100hz. The
 question is whether I should just insert the events regardless of whether
 any rule actually uses the instances' event type (because the rete-oo will
 filter out the unused types very quickly) or whether I should add a filter
 before sesssion.insert(..) to let only those types of events that are
 actually used by a rule.

 My second problem/question then becomes: How to determine which
 types/classes are actually used in LHS patterns for a given package? By
 this
 I mean, how can I write code to make this determination.
 --
 View this message in context:
 http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26505340.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 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] Does Session effeciently filter unused facts, or...

2009-11-24 Thread Barry Kaplan

Ah, yes Edson. I didn't even think of that. That will probably force my hand
to filter. 

But that then leaves me with how to determine the set of classes used in the
rules. Doing it by textual inspection is not viable since rules can be added
as part of the application (by users'). 

-- 
View this message in context: 
http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26507196.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] Does Session effeciently filter unused facts, or...

2009-11-24 Thread Barry Kaplan

An option like that would be ideal. However it would also be nice to have the
ability to determine the fact types so filtering pre
fact-handle-creation/insertion can be done as well.

In the meantime, for our current design at least, it will almost always be
the case that we can scale out if we overload drools. ie, Have a separate
thread/process per device (or subset), as the rules/cep processing is
hierarchical. Higher levels will be consuming events generated by lower
levels, but the rate of creation will decrease up the hierarchy.


Edson Tirelli-4 wrote:
 
 For future versions, I think we
 should add a kbase configuration option to tell the engine what to do in
 case of facts that don't match any rule: either keep them (as it does
 today)
 or discard them right away. What do you think?
 

-- 
View this message in context: 
http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26507232.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] Does Session effeciently filter unused facts, or...

2009-11-24 Thread Edson Tirelli
   In current Drools versions, you will need to use some internal APIs for
that, but we can probably add a higher level method call for the next
version.
   The LHS of a rule is a tree of RuleConditionElements. What you need to do
is navigate the tree recursively using the getNestedElements() method and
looking for Patterns. In pseudo algorithm:

***
Package pkg = ...; // obtain a package from the package builder or from the
rulebase

SetClass? usedClasses = new HashSetClass?();
for( Rule rule : pkg.getRules() ) {
RuleConditionElement lhs = rule.getLhs();
collectUsedClasses( usedClasses, lhs );
}
**

public void collectUsedClasses( SetClass? usedClasses,
RuleConditionElement rce ) {
if( rce instanceof Pattern ) {
ObjectType ot = ((Pattern)rce).getObjectType();
if( ot instanceof ClassObjectType ) {
   usedClasses.add( ((ClassObjectType)ot).getClassType() );
}
}
for( RuleConditionElement child : rce.getNestedElements() ) {
collectUsedClasses( usedClasses, child );
}
}

**

I wrote the above code directly into the e-mail, so there might be some
mistakes, but the idea is there... so you can probably figure out, based on
that.

Edson

2009/11/24 Barry Kaplan grou...@memelet.com


 Ah, yes Edson. I didn't even think of that. That will probably force my
 hand
 to filter.

 But that then leaves me with how to determine the set of classes used in
 the
 rules. Doing it by textual inspection is not viable since rules can be
 added
 as part of the application (by users'). So that pointer on how to
 determine
 used fact types would be much appreciated.

 --
 View this message in context:
 http://old.nabble.com/Does-Session-effeciently-filter-unused-facts%2C-or...-tp26489782p26507196.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 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 5.0 Guvnor install

2009-11-24 Thread Jervisliu
SzA84 wrote:
 Unfortunately that isn't good too.

 But I see this message:
 19:27:20,921 INFO  [AprLifecycleListener] The Apache Tomcat Native library
 which allows optimal performance in production environments was not found on
 the java.library.path
 I don't know what is it exactly, but may be this is the problem?


   
If you are using a snapshot version of Guvnor that was built from trunk 
(*after revision 30188)*, please follow this link [1] on how to install 
Guvnor in Tomcat 6.  If you are using Guvnor 5.0, you also need to 
install jsf libs (see [2[) besides what you are instructed to do 
according to [1].

[1]. http://www.jboss.org/community/docs/DOC-14395?uniqueTitle=false
[2]. http://www.jboss.org/community/wiki/JBRMSjsfdependencies


Hope this helps,
Jervis
 Sahid Khan (সাহিদ) wrote:
   
 On Tue, Nov 24, 2009 at 5:40 PM, SzA84 szepesiand...@citromail.hu wrote:
 
 And it says you should navigate to http://localhost/drools-jbrms and
 check
 that Guvnor appears, but it doesn't work, although the server is
 running.

   
 I think request url should be http://localhost/drools-guvnor


 -- 
 S.
 Argue with idiots, and you become an idiot. - PG
 ___
 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] Deploy Guvnor on websphere

2009-11-24 Thread Jervisliu
This might help: 
http://www.jboss.org/community/wiki/DeployingGuvnor5OnWebSphere

Cheers,
Jervis

Ambika Goel wrote:

 Hi All,

  

 I am trying to deploy Guvnor on Websphere v6.1.

  

 But I am getting the following error:

  

 WebApp E Exception caught while initializing context
 java.lang.RuntimeException: Could not create Component: assetLockManager
 at 
 org.jboss.seam.init.Initialization.addComponent(Initialization.java:1155)
 at 
 org.jboss.seam.init.Initialization.installComponents(Initialization.java:1071)
  

 at org.jboss.seam.init.Initialization.init(Initialization.java:720)
 at 
 org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34) 

 at 
 com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:652)
  

 at 
 com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:354)
  

 at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:292)
 at 
 com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92) 

 at 
 com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)

  

  

 Can anyone help me on this?

  

 Thanks,

 Ambika

 

 ___
 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] Passing user id and password to guvnor and Reaching Guvnor portal directly from my web-page

2009-11-24 Thread Jervisliu
Alok Patnaik wrote:
 Hi,
 I'm trying to reach guvnor portal from a link on my web-page. If I configure
 the guvnor to no authentication, then it works fine as a guest. Can someone
 please help, how to pass the user ID and password from my webpage to Guvnor
 5.1. Or is there any other way through which I can reach?
   
Guvnor is using Seam internally, you may want to do a bit research on 
how to do this in Seam. At the same time, please check the SAML 
integration with JBOSS AS [1]. [2], it might help. Sorry that this is 
all I can provide, not familiar with security stuff myself.

[1]. http://www.jboss.org/community/wiki/SeamIntegrationWithJBossIdentity
[2].  
http://www.jboss.org/community/wiki/JBossSeamsupportforWebBrowserSSOProfile


Cheers,
Jervis

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