Re: [rules-users] DSL editor

2007-08-14 Thread hypnosat7

hi,

  I have the same question concerning the Object in the dsl editor.
Thanks

megoy1 wrote:
 
 Did you ever get an answer to this? I was thinking the same thing.
 
 
 cmathrusse wrote:
 
 I'm using JBoss Rules 4.0MR2. I've installed the Eclipse IDE as well and
 begining to work with the DSL editor. It seems to be rather easy and
 intuitive
 except for one thing. The editor provides edit fields for Expression,
 Mapping,
 Object and scope. All of which make sense except for Object. What is this
 used
 for? There doesn't seem to be any reference to this field in the
 documentation.
 Can someone please privde me with an explanation and perhaps an example?
 
 Thanks very much
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/DSL-editor-tf3885450.html#a12140875
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] dsl mapping for and/or

2007-08-14 Thread hypnosat7


hi is it possible to have a dsl providing users to write somthing like :

  bool1  AND bool2 OR (bool4 AND bool5)

I tried to use eval and the mapping bellow :

TELS QUE {v1} ET ({v2} OU {v3})   --  eval({v1}  ({v2} || {v3}));

In my drl I have this condition :TELS QUE EA001 ET ( N OU F )

But it seems not working :


testFromMessage/Rule_indicateur___facturer_0.java (15:551) : Syntax 
error
on token OU, invalid AssignmentOperator
testFromMessage/Rule_indicateur___facturer_0.java (15:554) : F cannot be
resolved
-- 
View this message in context: 
http://www.nabble.com/dsl-mapping-for-and-or-tf4266238.html#a12141603
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] Test for null object, not null property

2007-08-14 Thread Edson Tirelli
   I don't think it makes sense to assert null into working memory... null
does not matches any object type anyway...
   Maybe what you want to do is to check for the non-existance of a fact:

when
not Building()
then
   ...
end

   So, don't ever assert null into working memory.

   Edson

2007/8/14, Stuart Moffatt [EMAIL PROTECTED]:

 The incoming building was initialized like this:

 Building building = null;
 FactHandle buildingFact = businessRuleSession.insert( building );
 businessRuleSession.setFocus(validate delete or get building);
 businessRuleSession.fireAllRules();

 Can drools test for this null building?
 What should the rule look like?

 rule building is null
 agenda-group validate delete or get building
 salience 10
 when
 boException : BOException()
 Building() == null  /* this is the problem here -- not sure what
 this should look like */
 then
 boException.setCode(BO-0008);
 end


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




-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  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] Test for null object, not null property

2007-08-14 Thread Stuart Moffatt
Edson,

Thanks for the tip. The not Building() works just fine, so long as I
don't assert the null building anyway.

I guess I was going for pure abstraction of all the rules, including
null even though deep down I knew it didn't make sense to assert a
null. The workaround is to hard code the null case like this:

private void validateGetBuilding( Building building ) throws BOException
{
// set up an exception
boException = new BOException();

// send the exception into the BRE
FactHandle boFact = businessRuleSession.insert( boException );

// send the building into the BRE
FactHandle buildingFact = null;
if( building != null )
{
buildingFact = businessRuleSession.insert( building );
}


// trigger the validate building agenda items
businessRuleSession.setFocus(validate delete or get building);

// fire
businessRuleSession.fireAllRules();

// retract items
businessRuleSession.retract(boFact);
if( buildingFact != null )
{
businessRuleSession.retract(buildingFact);
}

// check on the exception (is set in the rule)
if( boException.getCode() != null )
{

log.debug(Exception for building= + building);

String message = BOMessages.getProperty( boException.getCode() );
boException.setMessage(message);
throw boException;
}
}

With the rule in question being reconfigured to this:

rule building is null
agenda-group validate delete or get building
salience 10
when
boException : BOException()
not Building()
then
boException.setCode(BO-0008);
end

This ends up throwing the expected BOException:
08:16:26,093 DEBUG BuildingBO:288 = Exception for building=null
08:16:26,119 ERROR InCastAPI:73 = BO-0008: The building is null

Don't you just love the green bar in junit?

Thanks for you help -- really enjoying developing this app with Rules.

On 8/14/07, Edson Tirelli [EMAIL PROTECTED] wrote:

I don't think it makes sense to assert null into working memory... null 
 does not matches any object type anyway...
Maybe what you want to do is to check for the non-existance of a fact:

 when
 not Building()
 then
...
 end

So, don't ever assert null into working memory.

Edson


 2007/8/14, Stuart Moffatt [EMAIL PROTECTED] :
 
  The incoming building was initialized like this:
 
  Building building = null;
  FactHandle buildingFact = businessRuleSession.insert( building );
  businessRuleSession.setFocus(validate delete or get building);
  businessRuleSession.fireAllRules();
 
  Can drools test for this null building?
  What should the rule look like?
 
  rule building is null
  agenda-group validate delete or get building
  salience 10
  when
  boException : BOException()
  Building() == null  /* this is the problem here -- not sure what 
  this should look like */
  then
  boException.setCode(BO-0008);
  end
 
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
   https://lists.jboss.org/mailman/listinfo/rules-users
 
 



 --
   Edson Tirelli
   Software Engineer - JBoss Rules Core Developer
   Office: +55 11 3529-6000
   Mobile: +55 11 9287-5646
   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





-- 
Thanks,
Stuart

Stuart Moffatt
Disaster Resistant University
University of Utah
(801) 585-9122
[EMAIL PROTECTED]
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Support for MVEL-Projections in Drools

2007-08-14 Thread Manjax23

Does Drools support MVEL-Projections? 
If yes, could someone please illustrate an example.

Projections allow you to extract elements out of a complex object graph
into a single uniform collection.
 For example, if you have a list of User objects, and you want to get a
 list of the names of the users, assuming the User has a bean property for
 name:

userNames = (name in users)


Thanks,
manjax23
-- 
View this message in context: 
http://www.nabble.com/Support-for-MVEL-Projections-in-Drools-tf4267685.html#a12145681
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] Problems with BRMS

2007-08-14 Thread Felipe Piccolini
Its me again I have to apologize...it seems it was my fault... as  
far as I can get, the problem
was some classes not having right libraries or imports... jodatime  
for example...  but the halt

on modal window and the lack of good error report had me on limbo...

Thanks anyway.


On 13-08-2007, at 19:03, Felipe Piccolini wrote:

Using the last brms from snapshot repo (http:// 
cruisecontrol.jboss.com/cc/artifacts/jboss-rules) I can load a  
model jar but it
never show me the options to create LHS or RHS ... this is a  
picture of how it stay for ever and ever...


I really need to use the brms, we like it very much but still can  
use it right...


Picture 1.png

Thanks.

On 13-08-2007, at 18:17, Felipe Piccolini wrote:

Im having problems using the BRMS 4.0GA and BRMS 4.0 stand alone  
(v 1.0).


Things just crash without reason... importing models crash  
sometimes, and trying to create LHS in business rules

got stall... not showing any option to add fact or whatever...

In standalone version I have this error trying to load a model jar:
ERROR 13-08 18:14:32,552 (ApplicationContext.java:log:675)
Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException:  
java.lang.ClassNotFoundException:  
org.drools.brms.client.rpc.RuleAsset
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.d 
eserialize(ServerSerializationStreamReader.java:156)
at  
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader 
.readObject(AbstractSerializationStreamReader.java:61)
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.d 
eserializeValue(ServerSerializationStreamReader.java:70)
at  
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall 
(GWTRemoteServiceServlet.java:285)
at  
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost 
(GWTRemoteServiceServlet.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 
709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 
802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:173)
at org.jboss.seam.web.ContextFilter.doFilter 
(ContextFilter.java:56)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke 
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke 
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke 
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke 
(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke 
(StandardEngineValve.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke 
(AccessLogValve.java:541)
at org.apache.catalina.connector.CoyoteAdapter.service 
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process 
(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol 
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java: 
664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket 
(PoolTcpEndpoint.java:527)
at  
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt 
(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool 
$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.ClassNotFoundException:  
org.drools.brms.client.rpc.RuleAsset

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal 
(ClassLoader.java:319)

at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.d 
eserialize(ServerSerializationStreamReader.java:135)

... 24 more

PD: I checked the classes/enums in my model jar and all of them  
are Serializable...


PD2: Also have this error trying to show rule source from a  
business rule in the insurance example which is included with the  
stand alone

brms.

Thanks

Felipe Piccolini M.
[EMAIL PROTECTED]




___
rules-users mailing list
rules-users@lists.jboss.org

Re: [rules-users] From clause and connection time outs - suggestion

2007-08-14 Thread Mark Proctor
open a jira with a self contained test case showing the problem, or it 
will get forgotten about. The mailing list is not the best place to 
report enhancements requests, unless they are backed by a JIRA. The 
Drools developers only skim read the mailing lists and do not give it 
their full attention.


Mark
Arjun Dhar wrote:

Hi,
 in a load intensive operation, if a pool of JDBC connections is exausted 
the 'from' breaks. Ok, it should! (Not expecting magic :o) ) ,.. but I'm 
concerned about the trace it generates.


The stack trace does not suggest the ground reality and is very abstract. Can 
you have an enhacement to wrap the actual exception or atleast say somewhere 
he from failed? 


org.mvel.MVEL.executeExpression(MVEL.java:219)
org.drools.base.dataproviders.MVELDataProvider.getResults
(MVELDataProvider.java:45)

... I could figure out from the following lines what was wrong, but someone 
else may not be able to figure it out. It's not that big a deal, but just a 
suggestion since I think in high load conditions this would be a common error.


Full trace below
===
java.lang.reflect.InvocationTargetException
org.mvel.optimizers.impl.refl.MethodAccessor.getValue(MethodAccessor.java:54)
org.mvel.optimizers.impl.refl.VariableAccessor.getValue
(VariableAccessor.java:39)
org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:174)
org.mvel.MVELRuntime.execute(MVELRuntime.java:87)
org.mvel.CompiledExpression.getValue(CompiledExpression.java:98)
org.mvel.MVEL.executeExpression(MVEL.java:219)
org.drools.base.dataproviders.MVELDataProvider.getResults
(MVELDataProvider.java:45)
org.drools.reteoo.FromNode.assertTuple(FromNode.java:61)
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple
(SingleTupleSinkAdapter.java:20)
org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:120)
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple
(SingleTupleSinkAdapter.java:20)
org.drools.reteoo.JoinNode.assertObject(JoinNode.java:162)
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject
(CompositeObjectSinkAdapter.java:317)
org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject
(CompositeObjectSinkAdapter.java:308)
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:168)
org.drools.reteoo.Rete.assertObject(Rete.java:168)
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:848)
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:623)
org.drools.reteoo.ReteooStatelessSession.execute
(ReteooStatelessSession.java:135)
com.gryphonnetworks.brms.sessions.RulesEngineSessionJBossRules4.execute
(RulesEngineSessionJBossRules4.java:113)

___
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] Test for null object, not null property

2007-08-14 Thread Mark Proctor

no but you can do:
not( Building() )

Mark
Stuart Moffatt wrote:

The incoming building was initialized like this:

Building building = null;
FactHandle buildingFact = businessRuleSession.insert( building );
businessRuleSession.setFocus(validate delete or get building);
businessRuleSession.fireAllRules();

Can drools test for this null building?
What should the rule look like?

rule building is null
agenda-group validate delete or get building
salience 10
when
boException : BOException()
Building() == null  /* this is the problem here -- not sure 
what this should look like */

then
boException.setCode(BO-0008);
end



___
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] Problems with BRMS

2007-08-14 Thread Felipe Piccolini
I still have the problem in stand alone version trying to save an  
uploaded jar with model classes...


This works fine in brms.war version in jbossAS 4.0.5.

What am I doing wrong?...What can I do to solve this?... I like the  
way extra constrains are added down side (not

in the right side) of the constraint, like this:

$p: Person(code == 101 ||
== 102 ||
== 104 ||
== 105 ||
== 106 ||
== 107 ||

because in the actual BRMS GUI this is added aside...making the  
window larger to the right. and that is awful.


Thanks



Im having problems using the BRMS 4.0GA and BRMS 4.0 stand alone  
(v 1.0).


Things just crash without reason... importing models crash  
sometimes, and trying to create LHS in business rules

got stall... not showing any option to add fact or whatever...

In standalone version I have this error trying to load a model jar:
ERROR 13-08 18:14:32,552 (ApplicationContext.java:log:675)
Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException:  
java.lang.ClassNotFoundException:  
org.drools.brms.client.rpc.RuleAsset
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.d 
eserialize(ServerSerializationStreamReader.java:156)
at  
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader 
.readObject(AbstractSerializationStreamReader.java:61)
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.d 
eserializeValue(ServerSerializationStreamReader.java:70)
at  
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall 
(GWTRemoteServiceServlet.java:285)
at  
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost 
(GWTRemoteServiceServlet.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 
709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java: 
802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:173)
at org.jboss.seam.web.ContextFilter.doFilter 
(ContextFilter.java:56)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke 
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke 
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke 
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke 
(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke 
(StandardEngineValve.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke 
(AccessLogValve.java:541)
at org.apache.catalina.connector.CoyoteAdapter.service 
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process 
(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol 
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java: 
664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket 
(PoolTcpEndpoint.java:527)
at  
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt 
(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool 
$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.ClassNotFoundException:  
org.drools.brms.client.rpc.RuleAsset

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal 
(ClassLoader.java:319)

at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.d 
eserialize(ServerSerializationStreamReader.java:135)

... 24 more

PD: I checked the classes/enums in my model jar and all of them  
are Serializable...


PD2: Also have this error trying to show rule source from a  
business rule in the insurance example which is included with the  
stand alone

brms.

Thanks

Felipe Piccolini M.
[EMAIL PROTECTED]




___
rules-users mailing list
rules-users@lists.jboss.org

Re: [rules-users] Independent rule evaluations

2007-08-14 Thread Dr. Gernot Starke
as stated in the documentation, the actual (time-consuming) work is  
done during assert... no way around that, imho.



the fireAllRules() is fast!

can you detail your problem a little?

regards,
Gernot

Am 13.08.2007 um 18:47 schrieb Yuri:

Considering that I have a set of rules that can be time consuming  
to assert is
there a way to separate them from other rules without having to  
resort to

multiple working memories?

I basically want to be able to assert facts and evalute a set of  
rules as fast
as I can before actually having the time consuming set of rules  
evaluate.


thanks,

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



Dr. Gernot Starke
Doing IT Right

---
Willi-Lauf Allee 43, D-50858 Köln
[EMAIL PROTECTED],
 +49 (0) 177 - 728 2570
http://www.gernotstarke.de
Blog: http://it-and-more.blogspot.com

Das freie Portal für Software-Architekten:
http://www.arc42.de



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


[rules-users] rule validation

2007-08-14 Thread hypnosat7

Hi,

  I have some rules written in a dsl in a data base and I need to validate
those rule so I used a PackageBuilder instance and a PackageBuilderErrors
but it's a bit akward to manage with the subclasses of DroolsError. What I
need is to get the line number of the error in my drl file (the DroolsError
). 



How can I proceed ?
thanks

This is what I tried to do :
PackageBuilderErrors pkgBuilderErrors = builder.getErrors();
DroolsError[] droolsErrors = pkgBuilderErrors.getErrors();
ListDroolsError errorList = new
ArrayListDroolsError(Arrays.asList(droolsErrors));
for (DroolsError droolsError : errorList)
{
 if (droolsError instanceof ParserError)
{  ...
-- 
View this message in context: 
http://www.nabble.com/rule-validation-tf4268341.html#a12147869
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] RuntimePermission - createClassLoader

2007-08-14 Thread Smitha B
Hi,
   My J2EE application uses DROOLS 3.0.6 libraries for rules and runs on SUN 
JES 2005 Q4 server.
  I am getting the exception : 
Caused by: java.security.AccessControlException: access denied 
(java.lang.RuntimePermission createClassLoader)
  Currently I have granted RunTimePermission for createClassLoader in the 
global area (i.e for all jars) of server.policy and the application works fine. 
  But I want to specify the permissions for only drools and the dependent 
jars. 
Please let me know the list of jars which requires createClassLoader - 
RunTimePermission .
  The complete stack trace is given below: 
  
Regards
Smitha
   
  
--
  
(java.lang.RuntimePermission createClassLoader)
 at com.abc.rules.jboss.DroolsContainer.buildRuleBase(DroolsContainer.java:217)
 at com.abc.rules.jboss.DroolsContainer.init(DroolsContainer.java:91)
 at com.abc.rules.EnvironmentManager.initContainer(EnvironmentManager.java:252)
 at com.abc.rules.EnvironmentManager.init(EnvironmentManager.java:158)
 at com.abc.rules.PDMImpl.ejbCreate(PDMImpl.java:224)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at 
  
com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:4
10)
 at 
  
com.sun.ejb.containers.StatelessSessionContainer.access$100(StatelessSessionContainer.java:75)
 at 
  
com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContai
  ner.java:597)
 at 
com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:168)
 at 
  
com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:359)
 at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:1072)
 at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:772)
 at 
  
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:1
  26)
 at com.abc.sms.SendSmsImpl.sendSms(SendSmsImpl.java:654)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
  
com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:95
  0)
 at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
 at 
  
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:116)
 at $Proxy34.sendSms(Unknown Source)
 at 
  
com.sun.enterprise.webservice.EjbWebServiceDispatcher.handlePost(EjbWebServiceDispatcher.java:140)
 at 
  
com.sun.enterprise.webservice.EjbWebServiceDispatcher.invoke(EjbWebServiceDispatcher.java:79)
 at 
  
com.sun.enterprise.webservice.EjbWebServiceValve.dispatchToEjbEndpoint(EjbWebServiceValve.java:187)
 at 
com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:131)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:542)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
 at 
  
com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor.process(HttpServiceProcessor.java:
  226)
 at 
com.sun.enterprise.web.HttpServiceWebContainer.service(HttpServiceWebContainer.java:2071)
Caused by: java.security.AccessControlException: access denied 
(java.lang.RuntimePermission 
  createClassLoader)
 at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
 at java.security.AccessController.checkPermission(AccessController.java:427)
 at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
 at java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:594)
 at java.lang.ClassLoader.init(ClassLoader.java:201)
 at org.drools.rule.PackageCompilationData$PackageClassLoader.init(Unknown 
Source)
 at org.drools.rule.PackageCompilationData.init(Unknown Source)
 at org.drools.rule.PackageCompilationData.init(Unknown Source)
 at org.drools.rule.Package.init(Unknown Source)
 at org.drools.compiler.PackageBuilder.newPackage(Unknown Source)
 at org.drools.compiler.PackageBuilder.addPackage(Unknown Source)
 at org.drools.compiler.PackageBuilder.addPackageFromDrl(Unknown Source)
 at com.abc.rules.jboss.DroolsContainer.buildRuleBase(DroolsContainer.java:204)
 ... 41 more

   

   
-
Building a website is a piece of cake. 
Yahoo! Small Business 

[rules-users] if statement in MVEL consequence

2007-08-14 Thread mark . mcnally
Hello, 

I would like to conditionally attempt logging in the consequence of each rule 
but it does not like the 'if' statement.

Without the 'if', it works fine. It appears to work fine for the java dialect 
as well - only complains for MVEL dialect. 
It does not appear to be related to the logger instance because even if 
(true)  causes similar Exception.
I also tried with and without the curly braces.


global org.apache.commons.logging.Log logger

rule Language
dialect mvel
salience 800
when
$pd : ParticipantDetails( $ptLanguage : 
participant.languagePreferenceCD  )
$nd : NurseDetails( languages not contains $ptLanguage )
then
if (logger.isDebugEnabled()) 
 logger.debug(LanguageMismatch -  ptId:  + $pd.participant.id 
+ , Lang:  + $ptLanguage + , staffId:   + $nd.staffId );
[...] 
end



* (1,28) unable to resolve method using strict-mode: java.lang.Object.if(...)
Exception in thread main 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'primaryNurseAssignmentService' defined in class path resource 
[...]
nested exception is org.drools.rule.InvalidRulePackage: Unable to build 
expression for 'consequence' '  
if (logger.isDebugEnabled()) 
logger.debug(LanguageMismatch -  ptId:  + $pd.participant.id + , 
Lang:  + $ptLanguage + , staffId:   + $nd.staffId );


Should what I am attempting work? 

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


Re: [rules-users] if statement in MVEL consequence

2007-08-14 Thread Mark Proctor
imperative logic is disable, it promotes bad rules, we don't plan to add 
it back in. We suggest you call a function that encapsulates this logic.


Mark
[EMAIL PROTECTED] wrote:
Hello, 


I would like to conditionally attempt logging in the consequence of each rule 
but it does not like the 'if' statement.

Without the 'if', it works fine. It appears to work fine for the java dialect as well - only complains for MVEL dialect. 
It does not appear to be related to the logger instance because even if (true)  causes similar Exception.

I also tried with and without the curly braces.


global org.apache.commons.logging.Log logger

rule Language
dialect mvel
salience 800
when
$pd : ParticipantDetails( $ptLanguage : 
participant.languagePreferenceCD  )
$nd : NurseDetails( languages not contains $ptLanguage )
then
  	if (logger.isDebugEnabled()) 
  	 logger.debug(LanguageMismatch -  ptId:  + $pd.participant.id + , Lang:  + $ptLanguage + , staffId:   + $nd.staffId );
[...]  	  
end




* (1,28) unable to resolve method using strict-mode: java.lang.Object.if(...)
Exception in thread main org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'primaryNurseAssignmentService' defined in class path resource 
[...]
nested exception is org.drools.rule.InvalidRulePackage: Unable to build expression for 'consequence' '  	
if (logger.isDebugEnabled()) 
  	logger.debug(LanguageMismatch -  ptId:  + $pd.participant.id + , Lang:  + $ptLanguage + , staffId:   + $nd.staffId );



Should what I am attempting work? 


Thanks,
Mark  
___

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] Problems with BRMS

2007-08-14 Thread Fernando Meyer

Hey felipe,

	Im going to check the standalone version to see whats going on, 	 
thanks for your feedback

tks



On Aug 14, 2007, at 12:27 PM, Felipe Piccolini wrote:

I still have the problem in stand alone version trying to save an  
uploaded jar with model classes...


This works fine in brms.war version in jbossAS 4.0.5.

What am I doing wrong?...What can I do to solve this?... I like the  
way extra constrains are added down side (not

in the right side) of the constraint, like this:

$p: Person(code == 101 ||
== 102 ||
== 104 ||
== 105 ||
== 106 ||
== 107 ||

because in the actual BRMS GUI this is added aside...making the  
window larger to the right. and that is awful.


Thanks



Im having problems using the BRMS 4.0GA and BRMS 4.0 stand alone  
(v 1.0).


Things just crash without reason... importing models crash  
sometimes, and trying to create LHS in business rules

got stall... not showing any option to add fact or whatever...

In standalone version I have this error trying to load a model jar:
ERROR 13-08 18:14:32,552 (ApplicationContext.java:log:675)
Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException:  
java.lang.ClassNotFoundException:  
org.drools.brms.client.rpc.RuleAsset
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader. 
deserialize(ServerSerializationStreamReader.java:156)
at  
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReade 
r.readObject(AbstractSerializationStreamReader.java:61)
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader. 
deserializeValue(ServerSerializationStreamReader.java:70)
at  
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall 
(GWTRemoteServiceServlet.java:285)
at  
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost 
(GWTRemoteServiceServlet.java:181)
at javax.servlet.http.HttpServlet.service 
(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service 
(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:173)
at org.jboss.seam.web.ContextFilter.doFilter 
(ContextFilter.java:56)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:202)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke 
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke 
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke 
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke 
(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke 
(StandardEngineValve.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke 
(AccessLogValve.java:541)
at org.apache.catalina.connector.CoyoteAdapter.service 
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process 
(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol 
$Http11ConnectionHandler.processConnection 
(Http11BaseProtocol.java:664)
at  
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket 
(PoolTcpEndpoint.java:527)
at  
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt 
(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool 
$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.ClassNotFoundException:  
org.drools.brms.client.rpc.RuleAsset

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native  
Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java: 
188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal 
(ClassLoader.java:319)

at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at  
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader. 
deserialize(ServerSerializationStreamReader.java:135)

... 24 more

PD: I checked the classes/enums in my model jar and all of them  
are Serializable...


PD2: Also have this error trying to show rule source from a  
business rule in the insurance example which is included with the  
stand alone


[rules-users] Re: Independent rule evaluations

2007-08-14 Thread Yuri
Dr. Gernot Starke gs at gernotstarke.de writes:
 can you detail your problem a little?

I basically need to find perfect matches between two different sets of objects.
If perfect matches are not found, I then create bulks of objects that are then
used in combination with the individual ones to find bulk matches. If no matches
are found I need then to categorize the breaks (around 10 different
categorizations) and report them.

The matching criteria between two object is specific enough to be fast. Once I
get into break, which basically is removing some criteria components, the
possible combinations increase exponentially. Bulking just compounds the problem
by adding more matchable/breakable facts into memory. 

My bulking logic (I didnt have collect when I started with 3.0) starts a bulk
looking for two diff objects with the same bulkling criteria (this is my first
potential cross product since drools would produce C!/N!(C-N)! combinations).
Then once the bulk for a given criteria is create I have a second rule that
expands or contracts the bulks as new facts are asserted causing many different
side effects.

What I am basically seeing is that asserting a fact that would for instance be a
perfect match, causes many of the bulking and breaking rule activations to be
created and then cancelled. Considering that I am talking about tens or hundreds
of thousands of facts I thought that if I could stage the activation creations I
would increase processing speed.

With 15K objects on each side I have been seeing something like 1 assertion per
second.

I am aware that this could be cross product somewhere but I have already revised
the rules many many times so now I am looking for other alternatives.

I am now trying to understand looking I basically need to find perfect matches
between two different sets of objects. If perfect matches are not found, I then
create bulks of objects that are then used in combination with the individual
one to find bulk matches. If no matches are found I need then to categorize the
breaks (around 10 different categorizations) and report them.


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


[rules-users] Release status on website?

2007-08-14 Thread Scott Reed
I looked around the web site and don't see where there is an announcement or release schedule for 
the final release of 4.0. Please tell me where I can track Drools release status on the web site.

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


[rules-users] mve bugs

2007-08-14 Thread Mark Proctor
We've found a number of MVEL bugs in both the language and the IDE 
integration, we are busy working on these now. So please be aware of 
that if you are using the MVEL dialect.


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