Re: [rules-users] Re: Inserting Facts within Action nodes (RuleFlow)

2008-01-04 Thread Kris Verlaenen
 I would like to introduce if\while statements into the action node
The use of if/while statements in the MVEL dialect is disabled, as it usually 
leads to less declarative rules.  For simple if-statements, you can still use 
(x == null ? x : y).  More complex if/while constructs can usually be defined 
more declaratively using extra conditions in the lhs of a rule.

I must admit that in the context of action nodes, it might be valuable to 
enable them again in this context.  But our latest code on the svn repository 
already extended the action node so that you can use the java dialect as well, 
without limitations.

For now, I would suggest using rules to express you actions in complex cases, 
as they offer more flexibility.  And expect to see some usability improvements 
to most of the ruleflow nodes in the future, as the 4.0.x part was still more 
like a proof-of-concept implementation for some of the node types.

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


Re: [rules-users] Problems deploying BRMS on Jboss 4.0.1 AS

2008-01-04 Thread Fernando Meyer
Try to install jsf dependencies on your app server

On Jan 4, 2008 11:45 AM, [EMAIL PROTECTED] wrote:

 I tried version 4.0.3 with Jboss 4.0.1 AS and these are the errors I get

 ERROR [Engine] StandardContext[/drools-jbrms]Exception sending context
 initialized event to listener instance of class
 org.jboss.seam.servlet.SeamListener
 java.lang.RuntimeException: Could not create Component:
 org.jboss.seam.security.identity
at
 org.jboss.seam.init.Initialization.addComponent(Initialization.java:964)
at
 org.jboss.seam.init.Initialization.installComponents(Initialization.java
 :891)
at
 org.jboss.seam.init.Initialization.init(Initialization.java:547)
at
 org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java
 :34)

 Caused by: java.lang.NoClassDefFoundError:
 javax/faces/application/FacesMessage$Severity
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)

 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
 Incompletely deployed packages:
 [EMAIL PROTECTED] {
 url=file:/C:/apps/jboss-4.0.1sp1/server/default/deploy/drools-jbrms.war
 }
  deployer: [EMAIL PROTECTED]
  status: Deployment FAILED reason: URL
 file:/C:/apps/jboss-4.0.1sp1/server/default/tmp/deploy/tmp56124drools-
 jbrms-exp.war/
 deployment failed
  state: FAILED
  watch:
 file:/C:/apps/jboss-4.0.1sp1/server/default/deploy/drools-jbrms.war
  altDD: null
  lastDeployed: 1199453750061
  lastModified: 1199453749483
  mbeans:

 Any other ideas why Drools 4.0.1 BRMS (or 4.0.3) won't work with Jboss
 4.0.1 AS?

 On Fri, Jan 04, 2008 at 09:03:32AM +0530, Rahul Upadhyay wrote:
  It seems that some class files are missing in your BRMS war.
  domload BRMS war version4.0.3 form
  http://labs.jboss.com/drools/downloads.html.
 
  This will work.
 
  cheers
  Rahul Upadhyay
 
  On Jan 3, 2008 10:37 PM, [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I'm trying to deploy the Drools 4.0.1 JBRMS on the Jboss 4.0.1 AS
 and
  these are the errors I'm getting.  Can somone tell me why?
 
  INFO  [Scanner] scanning:
  C:\apps\jboss-4.0.1sp1\server\default\tmp\deploy\
  tmp7104drools-jbrms-exp.war\WEB-INF\classes
  INFO  [Initialization] reading /WEB-INF/components.xml
  ERROR [Engine] StandardContext[/drools-jbrms]Exception sending
 context
  initialized event to listener instance of class
  org.jboss.seam.servlet.SeamListener
  java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
  at org.jboss.seam.util.Resources.getResourceAsStream(Resources.java
 :21)
 
  ERROR [Context] Error listenerStart
  ERROR [Context] Context startup failed due to previous errors
  ERROR [WebModule] Starting failed
  jboss.web.deployment:war=drools-jbrms.war,id=-873092459
  org.jboss.deployment.DeploymentException: URL
  file:/C:/apps/jboss-4.0.1sp1/server/default/tmp/deploy/
  tmp7104drools-jbrms-exp.war /
  deployment failed at
  org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal
  (TomcatDeployer.java:365)
  at
  org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy
  (TomcatDeployer.java:92)
 
  WARN  [ServiceController] Problem starting service
  jboss.web.deployment:war=drools-jbrms.war,id=-873092459
  org.jboss.deployment.DeploymentException: URL
  file:/C:/apps/jboss-4.0.1sp1/server/default/tmp/deploy/
  tmp7104drools-jbrms-exp.war/
  deployment failed at
  org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal
  (TomcatDeployer.java:365)
  at
  org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy
  (TomcatDeployer.java:92)
 
  ERROR [MainDeployer] could not start deployment:
  file:/C:/apps/jboss-4.0.1sp1/server/default/deploy/drools-jbrms.war
  org.jboss.deployment.DeploymentException: URL
  file:/C:/apps/jboss-4.0.1sp1/server/default/tmp/deploy/
  tmp7104drools-jbrms-exp.war/
  deployment failed at
  org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal
  (TomcatDeployer.java:365)
  at
  org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy
  (TomcatDeployer.java:92)
 
 
  ERROR [URLDeploymentScanner] Incomplete Deployment listing:
  Incompletely deployed packages:
  [EMAIL PROTECTED] {
  url=file:/C:/apps/jboss-4.0.1sp1/server/default/deploy/drools-
 jbrms.war
  }
  deployer: [EMAIL PROTECTED]
  status: Deployment FAILED reason: URL
  file:/C:/apps/jboss-4.0.1sp1/server/default/tmp/deploy/
  tmp7104drools-jbrms-exp.war/
  deployment failed
   state: FAILED
   watch:
  file:/C:/apps/jboss-4.0.1sp1/server/default/deploy/drools- jbrms.war
   altDD: null
   lastDeployed: 1199378127367
   lastModified: 1199378127038
   mbeans:
 
  MBeans waiting for other MBeans:
  ObjectName: 

Re: [rules-users] Problems deploying BRMS on Jboss 4.0.1 AS

2008-01-04 Thread kissro
I followed the instructions on the wiki page below and copied the 2 jar
files to server/default/lib.  I then tried both 4.0.3 and 4.0.1 BRMS
.war files but got different errors for each.  They are below.

4.0.3
INFO  [Contexts] starting up: repositoryConfiguration
ERROR [Engine] StandardContext[/drools-jbrms]Exception sending context
initialized event to listener instance of class
org.jboss.seam.servlet.SeamListener
java.lang.NoSuchMethodError:
javassist.bytecode.Bytecode.addPutfield(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
at
org.jboss.seam.util.ProxyFactory.makeConstructor(ProxyFactory.java:519)
at
org.jboss.seam.util.ProxyFactory.makeConstructors(ProxyFactory.java:414)

4.0.1
INFO  [org.jboss.seam.contexts.Lifecycle] starting up:
repositoryConfiguration
DEBUG [org.jboss.seam.Component] instantiating Seam component:
repositoryConfiguration
ERROR [org.jboss.web.localhost.Engine]
StandardContext[/drools-jbrms]Exception sending context initialized
event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.NoSuchMethodError:
net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
at
org.jboss.seam.Component.createProxyFactory(Component.java:1933)
at org.jboss.seam.Component.getProxyFactory(Component.java:1122)

I don't know if it makes a difference, so I didn't mention it before,
but I'm using JBossIDE 2.0 with eclipse.

On Fri, Jan 04, 2008 at 12:05:14PM -0200, Fernando Meyer wrote:
 http://wiki.jboss.org/wiki/Wiki.jsp?page=JBRMSjsfdependencies
 
 On Jan 4, 2008 12:01 PM,  [EMAIL PROTECTED] wrote:
 
 I'm sorry, I'm just learning all this.  Could you be more specific;
 which files do I need (and where do I get them) and in which directory
 should I put them?

 Thank you
 On Fri, Jan 04, 2008 at 11:54:31AM -0200, Fernando Meyer wrote:
  Try to install jsf dependencies on your app server
 
  On Jan 4, 2008 11:45 AM, [EMAIL PROTECTED] wrote:
 
  I tried version 4.0.3 with Jboss 4.0.1 AS and these are the errors I
 get
 
  ERROR [Engine] StandardContext[/drools-jbrms]Exception sending
 context
  initialized event to listener instance of class
  org.jboss.seam.servlet.SeamListener
  java.lang.RuntimeException: Could not create Component:
  org.jboss.seam.security.identity
 at
  org.jboss.seam.init.Initialization.addComponent(Initialization.java
 :964)
 at
  org.jboss.seam.init.Initialization.installComponents
  (Initialization.java :891)
 at
  org.jboss.seam.init.Initialization.init(Initialization.java:547)
 at
  org.jboss.seam.servlet.SeamListener.contextInitialized
  (SeamListener.java :34)
 
  Caused by: java.lang.NoClassDefFoundError:
  javax/faces/application/FacesMessage$Severity
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods (Unknown Source)
 at java.lang.Class.getDeclaredMethods(Unknown Source)
 
  ERROR [URLDeploymentScanner] Incomplete Deployment listing:
  Incompletely deployed packages:
  [EMAIL PROTECTED] {
  url=file:/C:/apps/jboss-4.0.1sp1/server/default/deploy/
 drools-jbrms.war
  }
   deployer: [EMAIL PROTECTED]
   status: Deployment FAILED reason: URL
  file:/C:/apps/jboss- 4.0.1sp1/server/default/tmp/deploy/
  tmp56124drools-jbrms-exp.war/
  deployment failed
   state: FAILED
   watch:
  file:/C:/apps/jboss-4.0.1sp1/server/default/deploy/drools-jbrms.war
   altDD: null
   lastDeployed: 1199453750061
   lastModified: 1199453749483
   mbeans:
 
  Any other ideas why Drools 4.0.1 BRMS (or 4.0.3) won't work with
 Jboss
  4.0.1 AS?
 
  On Fri, Jan 04, 2008 at 09:03:32AM +0530, Rahul Upadhyay wrote:
   It seems that some class files are missing in your BRMS war.
   domload BRMS war version4.0.3 form
   http://labs.jboss.com/drools/downloads.html.
  
   This will work.
  
   cheers
   Rahul Upadhyay
  
   On Jan 3, 2008 10:37 PM, [EMAIL PROTECTED]  wrote:
  
   Hello,
  
   I'm trying to deploy the Drools 4.0.1 JBRMS on the Jboss 4.0.1
 AS and
   these are the errors I'm getting.  Can somone tell me why?
  
   INFO  [Scanner] scanning:
   C:\apps\jboss-4.0.1sp1\server\default\tmp\deploy\
   tmp7104drools-jbrms-exp.war\WEB-INF\classes
   INFO  [Initialization] reading /WEB-INF/components.xml
   ERROR [Engine] StandardContext[/drools-jbrms]Exception sending
  context
   initialized event to 

[rules-users] Does BRMS run on Jboss 4.0.1sp1 AS

2008-01-04 Thread kissro
Hi,

Does anyone know if any version of the Drools BRMS will work on the
Jboss 4.0.1sp1 AS?  I have been trying unsucessfully to get it to work.
Fernando helped me some by suggesting I install the jsf dependencies on
my app server.  That fixed one problem.  Another problem was fixed by
removing 'cglib-full-2.0.1.jar' from the
server/default/deploy/jboss-hibernate.deployer directory.

Following those two changes, the BRMS now opens in the web browser but
when I go to 'Packages' and try to add a new rule or create and save a
new package, it dies again with these errors.

INFO  [TransientRepository] Transient repository initialized
INFO  [TransientRepository] Session opened
INFO  [TransientRepository] Session opened
WARN  [Contexts] Could not destroy component: repository
java.lang.IllegalArgumentException: method not found: close for
component: repository
at org.jboss.seam.Component.callComponentMethod(Component.java:1820)
at org.jboss.seam.Component.callDestroyMethod(Component.java:1733)
at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:230)
at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:426)
at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:344)
.
.
.
Caused by: java.lang.NoSuchMethodException:
org.drools.brms.server.repository.RulesRepositoryManager$$EnhancerByCGLIB$$bae301ae.close()
at java.lang.Class.getMethod(Unknown Source)
at org.jboss.seam.Component.callComponentMethod(Component.java:1799)
   ... 38 more
INFO  [TransientRepository] Session opened
WARN  [Contexts] Could not destroy component: repository
java.lang.IllegalArgumentException: method not found: close for
component: repository
at org.jboss.seam.Component.callComponentMethod(Component.java:1820)
at org.jboss.seam.Component.callDestroyMethod(Component.java:1733)

These are the errors I get when I use the 4.0.1 BRMS .war file.  When
using the 4.0.3 .war file, I get completely different errors and it dies
before starting.  Can you even use BRMS on anything earlier than 4.0.2
AS?  If so, what else can I try to get around these errors?

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


[rules-users] Checking fact id

2008-01-04 Thread Massi Gmail

Hi guys,

Now I am strugglin' with fact id checking  or whatever we can call it :D

Let's take into account the followong scenario:

I have class A (it's just a name) javabeans to be inserted into the WM.

I define two objects of class A: A1 and A2.

Somewhere I do insert(A1) and insert(A2) ( let's say I do it in the same 
package of R1 and R2..see below...) 

Then I define two different rules R1 and R2 that reason over class A facts  
(let's say R1 and R2 are in the same package) .

The point is  I want R1 to fire only on A1 and R2 only on A2.

Is that possible in drools? Is there a sort of fact id I can reason over?

I do not think globals will be of any help, cause in the guide i have read that 
globals should never be used within LHS.
We should never reason over globals. 

Let me know.

Massi

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


[rules-users] repository documentation

2008-01-04 Thread John Verhaeg
Can someone point me to some documentation that explains how to populate a
drools repository with packages, models, rules, DSLs, etc., programmatically
without using the BRMS? TIA

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