Re: [rules-users] rules-users Digest, Vol 42, Issue 139

2010-06-04 Thread Jaroslaw Kijanowski
My best guess is that it must be something very trivial, like a typo in 
a file name or the selector name in the properties file or GUI... have 
you tried the latest and greatest 5.1 M2 release? There is built-in 
support for selectors based on category and status.
Moreover once you provid your own selector in the selectors.properties 
file it shows up as a custom selector in a drop down box.

Cheers,
  Jarek

John Peterson wrote:
 Checked my file and it was named selectors.properties (with the 's').
 Apparently, I made a typo while typing in my issue.  The file was there
 from my installation (I didn't create it myself).  I'm still having the
 error, though.
 
 --
 
 Hi,
   the file should be called
 selectors.properties and not
 selector.properties - I've just fixed that in the tutorial.
 
 Thanks,
   Jarek
 
 John Peterson wrote:
 I?m working off of Jaros?aw Kijanowski?s blog post from 7/8/2009 on 
 using Selectors:


 _http://www.kijanowski.eu/index.php?site=articlesarticle=guvnor_selecto
 rslang=en_ 
 http://www.kijanowski.eu/index.php?site=articlesarticle=guvnor_selecto
 rslang=en
 I?ve followed the instructions for a DRL selector, including adding a 
 line to the selector.properties file as follows:

 onlyNonDraftRules=/NonDraft.drl

 Both the NonDraft.drl file and selector.properties file are here:

 parent 

 directory\jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-IN
 F\classes
 My NonDraft.drl is as follows:

 package org.drools.guvnor.server.selector

 import org.drools.repository.AssetItem

 import org.drools.guvnor.server.selector.Allow

 rule 'non draft rules'

 dialect 'mvel'

 when

   AssetItem(stateDescription != Draft)

 then

   insert(new Allow());

 end

 When I try to do a ?Build Package? in Guvnor, I get the following
 error: 
 ?Name: com.sample, Format: package, Message: The Selector named 
 onlyNonDraftRules is not available?

 My package in Guvnor has a few rules, only one of which is not in
 Draft 
 status.  Everything is built in Guvnor (including Facts - no code is 
 written in Eclipse).

 Has anyone seen this error before and know how to correct it?  I?m
 using 
 5.0.1.



 
 ___
 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
 
 
 End of rules-users Digest, Vol 42, Issue 139
 
 
 ___
 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] Working on Selectors - getting 'The Selector named onlyNonDraftRules is not available'

2010-05-30 Thread Jaroslaw Kijanowski
Hi,
  the file should be called
selectors.properties and not
selector.properties - I've just fixed that in the tutorial.

Thanks,
  Jarek

John Peterson wrote:
 I’m working off of Jarosław Kijanowski’s blog post from 7/8/2009 on 
 using Selectors:
 
 _http://www.kijanowski.eu/index.php?site=articlesarticle=guvnor_selectorslang=en_
  
 http://www.kijanowski.eu/index.php?site=articlesarticle=guvnor_selectorslang=en
 
 I’ve followed the instructions for a DRL selector, including adding a 
 line to the selector.properties file as follows:
 
 onlyNonDraftRules=/NonDraft.drl
 
 Both the NonDraft.drl file and selector.properties file are here:
 
 parent 
 directory\jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-INF\classes
 
 My NonDraft.drl is as follows:
 
 package org.drools.guvnor.server.selector
 
 import org.drools.repository.AssetItem
 
 import org.drools.guvnor.server.selector.Allow
 
 rule 'non draft rules'
 
 dialect 'mvel'
 
 when
 
   AssetItem(stateDescription != Draft)
 
 then
 
   insert(new Allow());
 
 end
 
 When I try to do a “Build Package” in Guvnor, I get the following error: 
 “Name: com.sample, Format: package, Message: The Selector named 
 onlyNonDraftRules is not available”
 
 My package in Guvnor has a few rules, only one of which is not in Draft 
 status.  Everything is built in Guvnor (including Facts - no code is 
 written in Eclipse).
 
 Has anyone seen this error before and know how to correct it?  I’m using 
 5.0.1.
 
 
 
 
 ___
 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] how to move a repository from derby database to Oracle Database

2010-05-04 Thread Jaroslaw Kijanowski
The first FileSystem path param should be the same as in the default 
repository.xml file. This is

param name=path value=${rep.home}/repository/

and not

param name=path value=${rep.home}/

vadlam wrote:
 for some reason, the xml info within the OraclePersistenceManager tag came
 out as blank in the post.
 
 I am attaching the file this time.
 
 Also, I changed the path to point to rep.home variable as you suggested. I
 still get the same error. http://n3.nabble.com/file/n773632/repository.xml
 repository.xml 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] how to move a repository from derby database to Oracle Database

2010-05-01 Thread Jaroslaw Kijanowski
Oh, ok, so you've provided a homeDirectory property in components.xml

Then, as you already mentioned, create this directory and put the 
repository.xml file there.

To sum it up:
1. export your repo, stop the app server
2. delete everything inside the directory specified as homeDirectory in 
components.xml, but keep that directory itself - you need to do this to 
clean up after Derby
3. put the new repository.xml file into the homeDirectory and make sure 
you're starting with a clean Oracle DB
4. start your server - you should be asked to install a sample 
repository once logged in to Guvnor - ignore that and import your repo 
from the Administration menu

Does this work?

vadlam wrote:
 Yes, The same driver information works when the repository directories exist.
 My suspicion is that this error happens when the repository directory
 specified in repositoryx.ml does not exist during system startup.
 
 I get the same error whether it is default derby settings or Oracle settings
 if Repository ,version,workspace directories do not exist. The error stack
 trace below is when I use the derby settings.The error message is same as
 when I use Oracle settings.
 
 Apr 30, 2010 9:42:10 AM MST Warning HTTP BEA-101162 User defined
 listener org.jboss.seam.servlet.SeamListener failed:
  org.jboss.seam.InstantiationException: Could not instantiate Seam
 component: repositoryConfiguration.
 org.jboss.seam.InstantiationException: Could not instantiate Seam component:
 repositoryConfiguration
 at org.jboss.seam.Component.newInstance(Component.java:2066)
 at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
 at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
 at
 org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112)
 at org.jboss.seam.init.Initialization.init(Initialization.java:727)
 Truncated. see log file for complete stacktrace
 java.lang.ClassCastException:
 org.apache.xalan.processor.TransformerFactoryImpl
 at javax.xml.transform.TransformerFactory.newInstance(Unknown
 Source)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.internalCreateWorkspaceConfig(RepositoryConfig.java:530)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.createWorkspaceConfig(RepositoryConfig.java:591)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:335)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:142)
 Truncated. see log file for complete stacktrace
 Apr 30, 2010 9:42:10 AM MST Error Deployer BEA-149231 Unable to set
 the activation state to true for the application
 'drools-guvnor'.
 weblogic.application.ModuleException:
 at
 weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:891)
 at
 weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:333)
 at
 weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
 at
 weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
 at
 weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
 Truncated. see log file for complete stacktrace
 java.lang.ClassCastException:
 org.apache.xalan.processor.TransformerFactoryImpl
 at javax.xml.transform.TransformerFactory.newInstance(Unknown
 Source)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.internalCreateWorkspaceConfig(RepositoryConfig.java:530)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.createWorkspaceConfig(RepositoryConfig.java:591)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:335)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:142)
 Truncated. see log file for complete stacktrace
 
 This is what is logged in derby.log file when this error happens.
 
 
 2010-04-29 17:35:50.808 GMT:
  Booting Derby version The Apache Software Foundation - Apache Derby -
 10.2.1.6 - (452058): instance c013800d-0128-4aa3-875c-0c9dabf8
 on database directory
 C:\bea923HULA\user_projects\domains\hulaCdm_R110\config\drools\version\db  
 
 Database Class Loader started - derby.database.classpath=''
 
 2010-04-29 17:35:53.995 GMT:
  Booting Derby version The Apache Software Foundation - Apache Derby -
 10.2.1.6 - (452058): instance e03f4017-0128-4aa3-875c-0c9dabf8
 on database directory
 C:\bea923HULA\user_projects\domains\hulaCdm_R110\config\drools\workspaces\default\db
   
 
 Database Class Loader started - derby.database.classpath=''
 
 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] how to move a repository from derby database to Oracle Database

2010-05-01 Thread Jaroslaw Kijanowski
Looks like you're missing a couple of things in he repository.xml file.

In all FileSystem sections, leave the default 'path' parameter, taken 
from the original repository.xml
Jackrabbit will replace rep.home with /config/drools - no need to carry 
for this.

Your SearchIndex at the bottom is empty - it has no parameters - is 
there a reason why you have removed them?

Same goes for all your PersistenceManagers - there are no parameters, 
you need to provide driver, url, schema (set to oracle), user, 
password and schemaObjectPrefix (default value taken from the original 
repository.xml file is fine).



vadlam wrote:
 The directory specified in components.xml as home directory is
 /config/drools.
 
 I have the repository.xml in this directory.
 
 After I delete all the directories under drools and just have repository.xml
 in config/drools and restart, I get this error. so, I guess the problem is
 that jackrabbit cannot find the repository directory specified in
 repository.xml and hence causing this error.
 
 The same error happens irrespective of whether I have Oracle persistence or
 default derby persistence setttings.
 
 here is the Repository.xml I use. In components.xml, I have config/drools
 defined as the home directory
 
 ?xml version=1.0?
 !--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the License); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an AS IS BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 --
 !DOCTYPE Repository PUBLIC -//The Apache Software Foundation//DTD
 Jackrabbit 1.4//EN

 http://jackrabbit.apache.org/dtd/repository-1.4.dtd;
 !-- Example Repository Configuration File --
 Repository
 !--
 virtual file system where the repository stores global state
 (e.g. registered namespaces, custom node types, etc.)
 --
 FileSystem class=org.apache.jackrabbit.core.fs.local.LocalFileSystem
 
 !--param name=path value=C:/Data/jboss/repository/--
 /FileSystem
 
 !--
 security configuration
 --
 Security appName=Jackrabbit
 !--
 access manager:
 class: FQN of class implementing the AccessManager interface
 --
 AccessManager
 class=org.apache.jackrabbit.core.security.SimpleAccessManager
 !--  --
 /AccessManager
 
 LoginModule
 class=org.apache.jackrabbit.core.security.SimpleLoginModule
!-- anonymous user name ('anonymous' is the default value) --
!--  --
!--
   default user name to be used instead of the anonymous user
   when no login credentials are provided (unset by default)
--
!--  --
 /LoginModule
 /Security
 
 !--
 location of workspaces root directory and name of default workspace
 --
 Workspaces rootPath=${rep.home}/workspaces
 defaultWorkspace=default/
 !--
 workspace configuration template:
 used to create the initial workspace if there's no workspace yet
 --
 Workspace name=${wsp.name}
 !--
 virtual file system of the workspace:
 class: FQN of class implementing the FileSystem interface
 --
 FileSystem
 class=org.apache.jackrabbit.core.fs.local.LocalFileSystem
 
 /FileSystem
 !--
 persistence manager of the workspace:
 class: FQN of class implementing the PersistenceManager
 interface
 --
!--
PersistenceManager
 class=org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager
   
   
 /PersistenceManager
   
   -- 
   
PersistenceManager
 class=org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
  
  
 
  
  
  
 
  
   
 /PersistenceManager
   
 !--
 Search index and the file system it uses.
 class: FQN of class implementing the QueryHandler interface
 --
 SearchIndex
 class=org.apache.jackrabbit.core.query.lucene.SearchIndex
 
 
 
 
 /SearchIndex
 /Workspace
 
 !--
 Configures the versioning
 --
 Versioning 

Re: [rules-users] how to move a repository from derby database to Oracle Database

2010-04-30 Thread Jaroslaw Kijanowski
This doesn't tell me much. Maybe there's more in the log?

- Truncated. see log file for complete stacktrace

This might help as well.

http://www.ibm.com/developerworks/forums/thread.jspa?threadID=103468

One more thought - you have provided the Oracle driver to your app 
server, right?

vadlam wrote:
 after I delete repository,,version ,workspaces directories and delete all
 tables in the database and startweblogic again, I get the following error.
 
 Apr 29, 2010 11:35:10 AM MST Warning HTTP BEA-101162 User defined
 listener org.jboss.seam.servlet.SeamListener failed
 : org.jboss.seam.InstantiationException: Could not instantiate Seam
 component: repositoryConfiguration.
 org.jboss.seam.InstantiationException: Could not instantiate Seam component:
 repositoryConfiguration
 at org.jboss.seam.Component.newInstance(Component.java:2066)
 at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
 at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
 at
 org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112)
 at org.jboss.seam.init.Initialization.init(Initialization.java:727)
 Truncated. see log file for complete stacktrace
 java.lang.ClassCastException:
 org.apache.xalan.processor.TransformerFactoryImpl
 at javax.xml.transform.TransformerFactory.newInstance(Unknown
 Source)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.internalCreateWorkspaceConfig(RepositoryConfig.java:530)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.createWorkspaceConfig(RepositoryConfig.java:591)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:335)
 at
 org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:142)
 Truncated. see log file for complete stacktrace
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] how to move a repository from derby database to Oracle Database

2010-04-29 Thread Jaroslaw Kijanowski
Before you switch to Oracle, go to the Administration tab and export 
your repository.
Then configure your repository.xml file to point to Oracle, remove the 
repository directory (most probably in jboss-as/bin) and start your 
server. Then go to the admin tab and import your repo (first you need to 
unzip the xml file).

Cheers,
  Jarek

vadlam wrote:
 we have some rules developed under the default setup in Drools Guvnor. Those
 are stored to the default derby database .
 
 we would like to move repository to Oracle database.
 
 How do we do that?
 
 I have configured the Oracle database settings using th persistence manager
 in place of derby.
 
 when I restart the server, how do the rules get moved to the Oracle
 Repsoitory? 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] how to move a repository from derby database to Oracle Database

2010-04-29 Thread Jaroslaw Kijanowski
What you have provided is just the driver class, but yeah, this is the 
right one.
Moreover I would also consider to change the FileSystem to use 
org.apache.jackrabbit.core.fs.db.OracleFileSystem instead of the local 
file system.
But this is strictly Jackrabbit related stuff and you would need to have 
a look at their docs for further details.

vadlam wrote:
 In the repository.xml, there are 2 sections where the default database derby
 can be replaced with Oracle.
 
  PersistenceManager
 class=org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager
   
   
 /PersistenceManager
   
   
 to be replaced with 
   
PersistenceManager
 class=org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
  
  
 
  
  
  
 
  
   
 /PersistenceManager
   --
 
 PersistenceManager
 class=org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager
   
   
 /PersistenceManager

 to be replaced with   
   !-- 
 PersistenceManager
 class=org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
  
  
 
  
  
  
 
  
   

  
 /PersistenceManager 
 
 Does this look right? Basicallly, using the same Oracle database, but
 different tables for storing rules and versions.  
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] how to move a repository from derby database to Oracle Database

2010-04-29 Thread Jaroslaw Kijanowski
After the repo export, you need to delete the whole repository directory 
which includes:
repository
version
workspaces

and you have to clear the schema in Oracle you want to use - Guvnor will 
prepare the DB during deployment when accessing a fresh DB.

When you login, you should be asked to install a sample repo - simply 
press No, thanks and then import your repo from xml.

vadlam wrote:
 after exporting the repository, changing the persistence settings to Oracle,
 deleting the respository directory and restarting server again,
 
 I get these errors. Do I need to delete the version directory as well
 besides the repository directory ?
 
 ERROR 29-04 10:59:11,004 (ConnectionRecoveryManager.java:logException:447)
   
 could not execute statement, reason: ORA-0140
 0: cannot insert NULL into (DROOLSUSER.VERSION_NAMES.ID)
 , state/code: 23000/1400
 ERROR 29-04 10:59:11,019 (BundleDbPersistenceManager.java:storeBundle:1270)   
   
 failed to write bundle: deadbeef-face-babe-ca
 fe-babecafebabe
 java.lang.IllegalStateException: Unable to insert index:
 java.sql.SQLException: ORA-01400: cannot insert NULL into (DROOLSUSE
 R.VERSION_NAMES.ID)
 
 at
 org.apache.jackrabbit.core.persistence.bundle.util.NGKDbNameIndex.insertString(NGKDbNameIndex.java:71)
 at
 org.apache.jackrabbit.core.persistence.bundle.util.DbNameIndex.stringToIndex(DbNameIndex.java:101)
 at
 org.apache.jackrabbit.core.persistence.bundle.util.BundleBinding.writeBundle(BundleBinding.java:249)
 at
 org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.jav
 a:1262)
 at
 org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceM
 anager.java:703)
 at
 org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManag
 er.java:643)
 at
 org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:526)
 
 at
 org.apache.jackrabbit.core.version.VersionManagerImpl.init(VersionManagerImpl.java:157)
 at
 org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:400)
 at
 org.apache.jackrabbit.core.RepositoryImpl.init(RepositoryImpl.java:294)
 at
 org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
 at
 org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
 at
 org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
 at
 org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
 at
 org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
 at
 org.drools.guvnor.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:135)
 at
 org.drools.guvnor.server.repository.RepositoryStartupService.create(RepositoryStartupService.java:56)
 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 org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
 at
 org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
 at
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
 at
 org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
 at
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at
 org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
 at
 org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at
 org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
 at
 org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
 at
 org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
 at
 org.drools.guvnor.server.repository.RepositoryStartupService_$$_javassist_0.create(RepositoryStartupService_$$_java
 ssist_0.java)
 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 org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
 at
 org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
 at 

Re: [rules-users] Integration issue : Guvnor with Openldap

2010-04-21 Thread Jaroslaw Kijanowski
Try this one:

application-policy name=guvnor
authentication
login-module code=org.jboss.security.auth.spi.LdapExtLoginModule 
flag=required 
module-option 
name=java.naming.provider.urlldaps://localhost:16636/module-option
module-option name=java.naming.security.protocolssl/module-option
module-option 
name=bindDNcn=DirManager,dc=kijanowski,dc=eu/module-option
module-option name=bindCredentialadmin123/module-option
module-option 
name=baseCtxDNou=People,o=guvnor,dc=kijanowski,dc=eu/module-option
module-option name=baseFilter(uid={0})/module-option
module-option 
name=rolesCtxDNou=Roles,o=guvnor,dc=kijanowski,dc=eu/module-option
module-option name=roleFilter(member={1})/module-option
module-option name=roleAttributeIDcn/module-option
module-option name=roleRecursion-1/module-option
module-option name=searchScopeONELEVEL_SCOPE/module-option
/login-module
/authentication
/application-policy

When you have followed the tutorial, then you have setup ssl, so please 
keep in mind to use ldaps instead of ldap in the connection url. Change 
also the port from the default one, 389, to 16636.

And yes, the tutorial has a bug showing the login-config.xml file, since 
it has been copied over without the corresponding xml attributes...

Cheers,
  Jarek

Gayatri Chandak wrote:
 Hello All,
 
 An update from my side.
 We tried modifying the login-config.xml file as below:
   
  authentication 
  login-module
  code=org.jboss.security.auth.spi.LdapAuthenticatorLoginModule  
  flag=optional 
  module-option   
  name=java.naming.provider.urlldap://test.kalyani.com:389//module-option 
  module-option name=java.naming.security.protocolssl/module-option  
  module-option   
  name=java.naming.security.principalcn=DirManager/module-option  
  module-option   
  name=java.naming.security.credentialssecret/module-option   
  module-option name=searchBasedc=kijanowski,dc=eu/module-option 
  /login-module  
   login-module code=org.jboss.security.auth.spi.LdapExtLoginModule 
  flag=required 
module-option name=java.naming.factory.initial 
  com.sun.jndi.ldap.LdapCtxFactory/module-option 
module-option 
  name=java.naming.provider.urlldap://test.kalyani.com:389//module-option 
module-option 
  name=java.naming.security.authenticationsimple/module-option
module-option name=bindDNcn=DirManager,dc=kijanowski,dc=eu 
  /module-option 
module-option name=bindCredentialsecret/module-option
module-option 
  name=baseCtxDNou=People,o=guvnor,dc=kijanowski,dc=eu /module-option 
   
module-option name=baseFilter(uid={0})/module-option 
   
module-option 
  name=rolesCtxDNou=Roles,o=guvnor,dc=kijanowski,dc=eu /module-option 
module-option name=roleFilter(member={1})/module-option  
module-option name=roleAttributeIDmember/module-option   
module-option name=roleRecursion-1/module-option 
module-option name=roleNameAttributeIDcn/module-option   
module-option name=roleAttributeIsDNtrue/module-option   
module-option name=searchTimeLimit5000/module-option 
module-option name=searchScopeONELEVEL_SCOPE/module-option   
  /login-module  
   / authentication  
  /application-policy
   
 
 
 
 
  But, still we are not able to connect to the LDAP server   
  through the login page. We are getting the follwoing error :   
  [STDOUT] ERROR 15-04 11:59:15,597  
  (SecurityServiceImpl.java:login:73)   

Re: [rules-users] Trying to get Eclipse Java code to call Guvnor

2010-03-26 Thread Jaroslaw Kijanowski
Hey John,
  have you created a Drools Project in Eclipse? Then put the file in 
src/main/java
It will be copied over to the bin directory automatically and then 
picked up when running your app.

Cheers,
  Jarek

John Peterson wrote:
 I’m using the example code from the Red Hat Magazine - 
 ___http://magazine.redhat.com/2008/08/12/jboss-drools-how-to-tuning-guvnor-part-1/_
  
 - to try to get the sample code to work, but I keep getting the 
 following error:
 
 Exception in thread main___ java.lang.NullPointerException_
 
 at java.util.Properties$LineReader.readLine(Unknown Source)
 
 at java.util.Properties.load0(Unknown Source)
 
 at java.util.Properties.load(Unknown Source)
 
 at 
 org.drools.agent.RuleAgent.loadFromProperties(___RuleAgent.java:299_)
 
 at org.drools.agent.RuleAgent.newRuleAgent(___RuleAgent.java:256_)
 
 at test.GuvnorTest.main(___GuvnorTest.java:15_)
 
 It appears to be unable to find my ‘Guvnor.properties’ file, but I have 
 it in the classpath (I actually have it in several different places on 
 my C: drive as I tried to figure out why it couldn’t find it).  Does 
 anyone have any thoughts on what’s wrong here?
 
 I’d appreciate any guidance.  It seems like this should be a simple 
 answer but I haven’t been able to figure it out.
 
 
 
 
 ___
 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] How to Use BigDecimal in Drools 5.0

2010-02-05 Thread Jaroslaw Kijanowski
Hi,
  you might want to give this book a try:

Drools JBoss Rules 5.0 Developer's Guide

You'll find a *LOT* of examples using BigDecimal.

Cheers,
  Jarek

Nikhil S. Kulkarni wrote:
 Hi,
 
  
 
 I have a doubt that how to use java.math.BigDecimal within facts of Drools.
 
  
 
 Waiting for reply.
 
  
 
 Thanks  Regards,
 
 Nikhil S. Kulkarni
 
  
 
 
 
 
 MASTEK LTD.
 Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
 In the US, we're called MAJESCOMASTEK
 
 ~~
 Opinions expressed in this e-mail are those of the individual and not that of 
 Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
 does not accept any responsibility or liability for it. This e-mail and 
 attachments (if any) transmitted with it are confidential and/or privileged 
 and solely for the use of the intended person or entity to which it is 
 addressed. Any review, re-transmission, dissemination or other use of or 
 taking of any action in reliance upon this information by persons or entities 
 other than the intended recipient is prohibited. This e-mail and its 
 attachments have been scanned for the presence of computer viruses. It is the 
 responsibility of the recipient to run the virus check on e-mails and 
 attachments before opening them. If you have received this e-mail in error, 
 kindly delete this e-mail from desktop and server.
 ~~
 
 
 
 
 ___
 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] Error deserialize KnowledgeDefinitionsPackage

2010-02-04 Thread Jaroslaw Kijanowski
Hi,
  what's the version of Guvnor in your 'existing project'? Can you make 
sure it is the same as your agent's version?

Cheers,
  Jarek

Jian Feng Ng wrote:
 I am facing this error of knowledgeagent trying to deserialize 
 knowledgedefinitionspackage. Actually I am not too sure what caused this 
 problem..
 I have successfully deployed my rules in guvnor, and running a sample 
 test case on one of the ruleflow works fine. However, when I tried to 
 integrate into an existing project, using the same code of initializing 
 knowledgeagent from the sample test, the error occurred. I am using 
 drools 5.1.0.m1. Below is the error messages..
 
  
 
 jvm 1| WorkManager(2)-4 11:35:59,312 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:312:info] ResourceChangeScanner creat
 ed with default interval=60
 jvm 1| WorkManager(2)-4 11:35:59,312 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:312:info] ResourceChangeScanner recon
 figured with interval=15
 jvm 1| WorkManager(2)-4 11:35:59,531 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:531:info] ResourceChangeNotification
 created
 jvm 1| WorkManager(2)-4 11:35:59,531 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:531:debug] ResourceChangeNotification
  monitor added 
 monitor=org.drools.io.impl.resourcechangescanneri...@160498d 
 mailto:monitor=org.drools.io.impl.resourcechangescanneri...@160498d
 jvm 1| WorkManager(2)-4 11:35:59,531 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:531:info] KnowledgAgent created, with
  configuration:
 jvm 1| monitorChangeSetEvents=true scanResources=true 
 scanDirectories=true
 jvm 1| Thread-17 11:35:59,531 INFO  [STDOUT line:152] [2010:02:35 
 11:02:531:info] KnowledegAgent has started listeni
 ng for ChangeSet notifications
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] (null: 
 3, 92): schema_reference.4: Failed to read schem
 a document 'drools-change-set-5.0.xsd', because 1) could not find the 
 document; 2) the document could not be read; 3) th
 e root element of the document is not xsd:schema.
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] (null: 
 3, 92): cvc-elt.1: Cannot find the declaration o
 f element 'change-set'.
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] (null: 
 4, 10): schema_reference.4: Failed to read schem
 a document 'drools-change-set-5.0.xsd', because 1) could not find the 
 document; 2) the document could not be read; 3) th
 e root element of the document is not xsd:schema.
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] (null: 
 5, 132): schema_reference.4: Failed to read sche
 ma document 'drools-change-set-5.0.xsd', because 1) could not find the 
 document; 2) the document could not be read; 3) t
 he root element of the document is not xsd:schema.
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:609:info] KnowledgAgent applying Chan
 geSet
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:609:debug] KnowledgeAgent subscribing
  to resource=[UrlResource 
 path='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATES
 T']
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:609:debug] ResourceChangeNotification
  subscribing listener=org.drools.agent.impl.knowledgeagenti...@a0fdd1 
 mailto:listener=org.drools.agent.impl.knowledgeagenti...@a0fdd1 to 
 resource=[UrlResource path='http://localhost:80
 80/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST']
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:609:debug] ResourceChangeScanner subc
 ribing notifier=org.drools.io.impl.resourcechangenotifieri...@615dc4 
 mailto:notifier=org.drools.io.impl.resourcechangenotifieri...@615dc4 
 to resource=[UrlResource path='http://localhost:808
 0/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST']
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:609:debug] KnowledgeAgent ChangeSet r
 equires KnowledgeBuilder
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:609:debug] KnowledgeAgent rebuilding
 KnowledgeBase using ChangeSet
 jvm 1| WorkManager(2)-4 11:35:59,609 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:609:debug] KnowledgeAgent building re
 source=[UrlResource 
 path='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST']
 jvm 1| WorkManager(2)-4 11:35:59,843 INFO  [STDOUT line:152] 
 [2010:02:35 11:02:843:exception]
 jvm 1| WorkManager(2)-4 11:35:59,843 INFO  [STDOUT line:152] 
 java.lang.RuntimeException: KnowledgeAgent exception wh
 ile trying to deserialize KnowledgeDefinitionsPackage
 jvm 1| WorkManager(2)-4 11:35:59,843 INFO  [STDOUT line:152]
 at org.drools.agent.impl.KnowledgeAgentImpl.rebu
 ildResources(KnowledgeAgentImpl.java:418)
 jvm 1| WorkManager(2)-4 11:35:59,843 INFO  [STDOUT line:152]  

Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage

2010-01-18 Thread Jaroslaw Kijanowski
Hi,

HonorGod wrote:
 I am getting the following error while accessing decision tables that were
 uploaded in Guvnor -
 
 java.lang.RuntimeException: KnowledgeAgent exception while trying to
 deserialize KnowledgeDefinitionsPackage  
   at
 org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:418)
.
.
.
 Caused by: java.io.FileNotFoundException:
 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/packages/CorporateAction/

This is not a valid package, should be
package/CorporateAction/LATEST
instead of
package*s*/CorporateAction/

'LATEST' is the name of your latest build, it could be also a snapshot.

Cheers,
  Jarek


   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
 Source)
   at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:76)
   at
 org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:407)
   ... 6 more
 
 
 Java Code
 
 private StatefulKnowledgeSession getSession() {
 
 LogUtil.caRecommendationLogger.info(Getting session for Rules
 Engine ...);
 // Set the interval on the ResourceChangeScannerService if you are
 to use it
 // and default of 60s is not desirable.
 final ResourceChangeScannerConfiguration sconf =
 ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
 // set the disk scanning interval to 30s, default is 60s
 sconf.setProperty(drools.resource.scanner.interval, 30);
 
 ResourceFactory.getResourceChangeScannerService().configure(sconf);
 
 knowledgeBaseFromDecisionTable =
 KnowledgeBaseFactory.newKnowledgeBase();
 
 final KnowledgeAgentConfiguration aconf =
 KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
 
 // we want to scan directories, not just files, turning this on
 turns on file
 // scanning
 aconf.setProperty(drools.agent.scanDirectories, true);
 // resource changes results in a new instance of the KnowledgeBase
 being
 // built, this cannot currently be set to false for incremental
 building
 aconf.setProperty(drools.agent.newInstance, true);
 
 final KnowledgeAgent kagent =
 KnowledgeAgentFactory.newKnowledgeAgent(kagent,
 knowledgeBaseFromDecisionTable, aconf);

 kagent.applyChangeSet(ResourceFactory.newClassPathResource(changeset.xml));

 //kagent.applyChangeSet(ResourceFactory.newFileResource(c:/changeset.xml));
 return kagent.getKnowledgeBase().newStatefulKnowledgeSession();
 
 } 
 -
 changeset.xml
 
 ?xml version=1.0 encoding=UTF-8?
 change-set xmlns='http://drools.org/drools-5.0/change-set'
 xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
 xs:schemaLocation='http://drools.org/drools-5.0/change-set
 drools-change-set-5.0.xsd'
 add
 resource
 source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/packages/CorporateAction/'
 type='PKG' /
 /add
 /change-set 
 
 
 Please help. 
 
 Thanks!
 
___
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-12-03 Thread Jaroslaw Kijanowski
Looks like it is related to this open jira:
https://jira.jboss.org/jira/browse/GUVNOR-379

Cheers,
  Jarek

richarda wrote:
 Yeah, its in the classpath..  and to be doubly sure just before the code I do
 a 
 Signature s=new Signature();
 and that works.. so jvm can find the Signature object.
 
 I have created https://jira.jboss.org/jira/browse/JBRULES-2348
 I would love to know if any workarounds are possible, this has ground my
 project to a halt.
 
 thanks
 Ric
 
 
 Edson Tirelli-4 wrote:
Kris just reminded me of something: do you have the actual Message
 class
 in the test program classpath?

When downloading the package from guvnor, I think it does not download
 the model jar... only the actual rules, etc...

Edson

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

 Also tried under 5.1.0M1 release.. same issue :(
 Am i doing something wrong by declaring the @role in the Configuration
 section?


 richarda wrote:
 Still trying to get this to work.
 I have managed to create from a default (new) guvnor setup.

 Steps I do..
 1. Create fresh guvnor
 2. In eclipse create  Message.java file in package com.sample, and
 create
 a jar file
 3. In guvnor import the model for the Message.jar file
 4. In guvnor create a category
 5. Create an import statement for  import com.sample.Message
 6. Create a simple technical rule,  something like   when, Message(),
 then, System.out.println(.);
 7. Build the pkg
 8. download the pkg

 use the code from previous post to load the pkg...
 it works fine..

 now, goto guvnor advanced view and change the Configuration from:
 import com.sample.Message

 to:

 import com.sample.Message;

 declare Message
   @role( event )
 end


 build the pkg,
 download the pkg,
 run the test program...

 I get:
 org.drools.RuntimeDroolsException: unable to resolve Type Declaration
 class 'Message'
   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)
   at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:69)
   at com.sample.DroolsTest.main(DroolsTest.java:27)


 richarda wrote:
 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-tp26497326p26519888.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


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

Re: [rules-users] Uploading DSL/DSLR to guvnor

2009-11-03 Thread Jaroslaw Kijanowski
Hi Daniel,

  you can create a new DSLR rule when you choose 'DSL Business Rule' in 
the 'New Rule' dialog.

Cheers,
  Jarek

dbrownell83 wrote:
 Hi all,
 
 is there a way to upload a DSL and DSLR in Guvnor?  
 
 I see you can enter a new DSL, so copy-pasting is an option... but then what
 about the DSLR?
 
 Thanks,
 Daniel 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Implementaion of Rule Flow in Guvnor

2009-11-03 Thread Jaroslaw Kijanowski
Hi Ambika,
  your rules in the first rule flow group MasterHud set a new value on 
a fact's field.
Then you expect that your rules in the second rule flow group fire.
The rule engine has no idea that some facts' fields changed until you 
let the engine know via update();

Open your MasterHud decision table and edit the action column (check the 
'Update engine with changes:' check box), build the package and enjoy.

Cheers,
  Jarek

Ambika Goel wrote:
 Hi All,
 
  
 
 I have attached the Guvnor repository and the java code that I am using 
 to run a ruleflow.
 
  
 
 The two tables /‘MasterHud’/ and /‘FeeCalc’/ are decision tables made in 
 Guvnor.
 
 * /MasterHud/ decision table is used to get the /hudLineNumber/
   based on /lienPosition/ and /productType/.
 * /FeeCalc/ table is used to get the fee based on /hudLineNumber/.
 
  
 
 I have created a ruleflow ‘/Fee.rf’/ which connects these two tables.
 
 Below is the code I use to call /Fee.rf/:
 
  
 
 public static void  main(String args[]){
 
 try{
 
 KnowledgeBase kbase = 
 readKnowledgeBase();
 
 StatefulKnowledgeSession ksession = 
 kbase.newStatefulKnowledgeSession();
 

 
 LoanDetail l = new LoanDetail();
 
 l.setLienPosition(Second Lien);
 
 l.setProductType(ABC);
 
 ksession.insert(l);
 

 
 ksession.startProcess(hudRule);
 
 ksession.fireAllRules();
 

 
 System.out.println(Hud Line Number: 
  +l.getHudLineNumber());
 
 System.out.println(Fee:  +l.getFee());
 

 
 ksession.dispose();  
 
 }catch(Throwable t){
 
 t.printStackTrace();
 
 }
 
 }
 
 private static KnowledgeBase readKnowledgeBase()throws 
 Exception{
 
 KnowledgeBuilder kbuilder = 
 KnowledgeBuilderFactory.newKnowledgeBuilder();
 
 kbuilder.add( 
 ResourceFactory.newUrlResource(http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/com.example/LATEST;),ResourceType.PKG);
 
 
 kbuilder.add(ResourceFactory.newClassPathResource(Fee.rf, Test.class), 
 ResourceType.DRF);
 
 KnowledgeBuilderErrors errors = 
 kbuilder.getErrors();
 
 if(errors.size()0){
 
 for(KnowledgeBuilderError error : 
 errors){
 
 System.err.println(error);
 
 }
 
 throw new 
 IllegalArgumentException(Could not parse knowledge.);
 
 }
 

 
 KnowledgeBase kbase = 
 KnowledgeBaseFactory.newKnowledgeBase();
 
 
 kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
 
 return kbase;
 
 }
 
  
 
 *When I run this code, I get the Hud Line Number as **801** but the fee 
 displayed is **0.0***
 
 *The expected output is Hud Line Number as **801 **but the fee displayed 
 as **450.*
 
 * *
 
 *There is no exception but I don’t get the desired output.*
 
  
 
  
 
 
 
 *From:* Ambika Goel
 *Sent:* Monday, October 12, 2009 1:09 PM
 *To:* 'rules-users@lists.jboss.org'
 *Subject:* Implementaion of Rule Flow in Guvnor
 
  
 
 I am using the following code to add to knowledge builder and run it:
 
  
 
 knowledgeBuilder.add(ResourceFactory.newClassPathResource(“QueueFlow.rf”, 
 GuvnorTest.class), ResourceType.DRF) // ruleflow
 
 knowledgeBuilder.add(ResourceFactory.newUrlResource(“http://...”), 
 ResourceType.PKG) // guvnor package
 
  
 
  My rule flow is connection of two tables. I set a property in action of 
 one decision table and use it as a condition in another decision table 
 to get the desired result.
 
  
 
 If I run the above code, I don’t get any exception but the output is 
 ‘null’.
 
 
 
 
 ___
 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] Once the engine gets the package from guvnor, how to cache it and make it independent of guvnor.

2009-11-03 Thread Jaroslaw Kijanowski
Hi,

Wesley Akio Imamura wrote:
 Hi,
 
 I'm using this drools 5.0 scenario: agent using changeset file pointing 
 to a LATEST package guvnor URL.
 
 The guvnor docs says how to start the agent resource scanning to make 
 the engine change aware:
 - ResourceFactory.getResourceChangeNotifierService().start();
 - ResourceFactory.getResourceChangeScannerService().start();
  
 I suppose once the agent gets the packages from guvnor and caches it, it 
 should not need guvnor anymore unless there are changes. The agent could 
 use the cache and guvnor could be offline for a long time. This worked 
 on version 5 M1. You could even restart the engine and it started using 
 the cached version.


This was broken in 5.0.1, but works fine in trunk.


 
 The problem I have with the latest 5.0 with new Knowledge classes ang 
 changeset.xml: when guvnor is offline, the resource scanning detects 
 this and unsubscribes the package, leaving the engine without any 
 knowledge. When guvnor is up again, the resource scanning cannot detect 
 it, and the engine remains without any knowledge.
 
 How do I tell the agent to not unsubscribe url's that are offline, not 
 to remove their knowledge and just use the cache ?
 Can I still configure the cache directory ?


Yes, just use the drools.resource.urlcache system property.

Cheers,
  Jarek


 Maybe the problem I have is that I'm using the LATEST packages and not 
 snapshots ?
 
 The point here is to make the engine totally independent of Guvnor when 
 it got a package once.
 
 Hope anyone can help me. Maybe I'll try version 5.1 to see what happens 
 then guvnor is down.
 
 Thanks,
 Wesley.
 
 [2009:10:292 12:10:296:debug] ResourceChangeScanner attempt to scan 0 
 resources
 
 -- 
 Wesley Akio Imamura
 São Paulo - SP - Brazil
 
 
 
 
 ___
 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] Oracle Database to store rules in Guvnor

2009-10-18 Thread Jaroslaw Kijanowski
Hi,
  this might be a driver version issue.

BTW, what Oracle version are you using?

Cheers,
  Jarek

Ambika Goel wrote:
  Hi All,
 
  
 
 I am using Oracle database to store rules repository via apache 
 jackrabbit in Guvnor. I have made relevant changes in repository.xml.
 
  
 
 When I use this repository.xml in Jboss, the Guvnor.html loads after 
 around 2 hrs of processing.
 
 And in the server.log I can see
 
  
 
 *java.sql.SQLException: IOException: Connection reset by peer: socket 
 write error*
 
  
 
  
 
 Can anyone please tell me why it’s taking so much time for the 
 Guvnor.html to load?
 
 
 
 
 ___
 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] Problem in accessing change-set.xml for decision table entry

2009-10-04 Thread Jaroslaw Kijanowski
Hi,
  your change-set xml file looks good - can you please make sure you 
have a sheet called 'Tables' in your abc.xls spreadsheet?

Cheers,
  Jarek

Nikhil S. Kulkarni wrote:
 Hi,
 
  
 
 I am using Drools 5
 
 I am facing following issue :-
 
  
 
 While trying to access change-set.xml with decision table entry, I am 
 getting NULLPOINTEREXCEPTION
 
  
 
 Following code is change-set.xml :-
 
 e.g.
 
  
 
 ?xml version=1.0 encoding=UTF-8?
 
 change-set xmlns='http://drools.org/drools-5.0/change-set'
 
 xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
 
 xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'
 
  
 
 add
 
 resource source='classpath:data/abc.xls' type=DTABLE
 
   decisiontable-conf input-type=XLS 
 worksheet-name=Tables /
 
/resource
 
 /add
 
 /change-set
 
  
 
 Please Reply If anybody is able to access decision table in this way.
 
  
 
 Waiting for Reply.
 
  
 
 Thanks  Regards,
 
 Nikhil S. Kulkarni
 
  
 
 
 
 
 MASTEK LTD.
 Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
 In the US, we're called MAJESCOMASTEK
 
 ~~
 Opinions expressed in this e-mail are those of the individual and not that of 
 Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
 does not accept any responsibility or liability for it. This e-mail and 
 attachments (if any) transmitted with it are confidential and/or privileged 
 and solely for the use of the intended person or entity to which it is 
 addressed. Any review, re-transmission, dissemination or other use of or 
 taking of any action in reliance upon this information by persons or entities 
 other than the intended recipient is prohibited. This e-mail and its 
 attachments have been scanned for the presence of computer viruses. It is the 
 responsibility of the recipient to run the virus check on e-mails and 
 attachments before opening them. If you have received this e-mail in error, 
 kindly delete this e-mail from desktop and server.
 ~~
 
 
 
 
 ___
 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] Argument truncation in decision table

2009-10-03 Thread Jaroslaw Kijanowski
Hi,
  can you attach your spreadsheet? I had no issue to use a function that 
takes 8 args (same type and order as in your example) in a decision table.
Could be some typo.

Cheers,
  Jarek

Robert Morse wrote:
 Hello,
 I have a Seam (2.2.0.GA) application running under JBoss 5.1.0.GA.   
 This release of Seam uses the Drools 5.0.1.GA build.  I'm implementing  
 a Decision Table for the first time and importing it into Guvnor (also  
 from the same distribution).One of the consequences of several  
 rules is to call a method that had eight arguments:   (String, String,  
 Boolean, Boolean, Integer, String, String, String).   When I attempted  
 to compile the rule set, the method was truncated after the fifth  
 (Integer) argument which obviously caused some compile issues.  My  
 work around was to break this single method in to two methods, and it  
 works just fine.
 
 The original method worked just fine when used in a DRL.   Don't know  
 if there's a limit to function arguments within Decision Tables or if  
 this might be a bug.
 
 -robert.
 
 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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to use enumeration in web based decision table using Guvnor

2009-09-05 Thread Jaroslaw Kijanowski
Hi,

Johan Kumps wrote:
  
 Hi all,
  
 I want to use a value list voor e certain fact field in a web based 
 decision table in Guvnor. I created an enumeration in the same package 
 as follows : 'RegistriesInvocationContext.endUser' : ['TRUE=YES', 
 'FALSE=NO', '=Not to be checked']
 The enumeration has BooleanValues as name
 When defining the rule columns (condition) I put this in the value list 
 field : {endUser:ENUM:BooleanValues} 

leave this filed blank and your enumeration will do the rest automatically.

Cheers,
  Jarek

 where endUser is a field of my fact 
 class. When creating my rules no drop down is being rendered. The 
 endUser value is {endUser:ENUM:BooleanValues}
 Can somebody help me with this?
  
 Can you give an example?
  
 Kind regards,
 
 
 
 
 ___
 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] Guvnor and Drools 4.0.7

2009-08-20 Thread Jaroslaw Kijanowski
Leonardo Gomes wrote:
 Hi All -
 
 Is Guvnor meant to work only with Drools 5?

Yes.

 
 Thanks,
 Leo.
 
 
 
 
 ___
 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] how to use xml file instead of java object ?

2009-08-20 Thread Jaroslaw Kijanowski
Hi,
  have a look at the dsl:

http://anonsvn.jboss.org/repos/labs/labs/jbossesb/tags/JBESB_4_6/product/services/jbrules/src/main/resources/XPathLanguage.dsl

This rule expects an object of type org.jboss.soa.esb.message.Message 
which contains the XML in its body.

Also note that a lot of stuff is going on behind the scenes:
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/tags/JBESB_4_6/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/routing/cbr/DslHelper.java

Drools Pipeline might be helpful in inserting XML data into sessions.
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e1992

Cheers,
  Jarek

tv.raghavan wrote:
 I remember seeing a sample in jboss-esb sample where they were able to use
 xpath to query a xml file
 
 [sample extract]
 package com.jboss.soa.esb.routing.cbr
 
 #list any import classes here.
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.message.format.MessageType;
 
 expander XPathLanguage.dsl
 
 #declare any global variables here
 global java.util.List destinations;
 
 rule Blue Routing Rule using XPATH  
   when
   xpathEquals /Order/@statusCode, 0
   then 
   Log : Blue Team;
   Destination : blue;   
 end
 
 Is it possible to use this approach to use a xml as input to drool vs java
 object ?
 
 Thanks,
 -Raghav
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] org.drools.RuntimeDroolsException when inserting into Knowledge Session

2009-08-01 Thread Jaroslaw Kijanowski
Hi,
  before you insert any facts, make sure you set all globals used in 
your rules.

Cheers,
  Jarek

Abarna Ramachandran wrote:
 I am getting the following error when trying to insert my object into 
 ksession. I have attached my rules and java object. Please help me in 
 debugging why this is happening. I am using java 5 and drools 5.0
 
 thanks
 
 *error while inserting:*
 
 org.drools.RuntimeDroolsException:
 defaultpkg.rule_checkstationnumber_0eval0invo...@e4aea391 : 
 java.lang.NullPointerException
 
 *rules.drl*
 import java.lang.*;
 import java.util.*;
 import ct.fw.rules.*;
 import ct.fw.utils.*;
 import ct.fw.rules.*;
 import ct.fw.logging.*;
 import ct.fw.pf.dbi.*;
 import ct.fw.pf.dao.*;
 import ct.fw.pf.seq.*;
 import ct.fw.pf.util.*;
 import ct.fw.pf.vo.*;
 import ct.fw.ex.*;
 import org.apache.commons.lang.*;
 import com.aa.gccp.domain.*;
 
global ct.fw.rules.AssertionObject ao
global ct.fw.logging.SmartLogger log

 function BillingRecord getRecord(AssertionObject ao)
 {
 return (BillingRecord) ao.get(0);
 }
 function void debug(String msg,SmartLogger log)
 {
 log.debug(BusinessRulesValidator.class, msg);
 }
 function void error(String msg,SmartLogger log)
 {
 log.error(BusinessRulesValidator.class, msg);
 System.out.println(Message from rules +msg);
 }
  
 rule CheckTrue
 when
eval(true)
 then
 System.out.println(evaluating true);
 end
 
 rule CheckTrue2
 when
eval(true)
 then
 error(evaluating from rules2,log);
 end
 
 rule CheckStationNumber
 when
eval(((getRecord(ao)).getStationNo()) == null)
 then
 error(station number should not be null,log);
 end
 
 *part where i load the rules and insert the facts. There is no error 
 when loading the rules.drl. That means no parsing errors. The error 
 happens at ksessio.insert(assertionObject).*
 
 public void assertRulesObject(AssertionObject assertionObject) throws 
 BusinessRuleException
 {
 long current = System.currentTimeMillis();
 KnowledgeBase kbase = knowledgeBasesMap.get(rulesFileName);
 
 if (kbase == null)
 {
 kbase = knowledgeBasesMap.get(rulesFileName + DRL);
 }
 
 if ((kbase == null) || ((current - lastRefreshedMilliseconds)  
 refreshTimeMilliseconds))
 {
 if (rulesFileName.toLowerCase().indexOf(DRL) == -1)
 {
 kbase = load(rulesFileName + DRL);
 }
 else
 {
 kbase = load(rulesFileName);
 }
 
 lastRefreshedMilliseconds = System.currentTimeMillis();
 }
 this.assertionObject = assertionObject;
 
 List assertionobjectslist = new ArrayList();
 *// i am just doing this part just to make sure assertion object is not 
 null and i will get some answer. this part runs fine.  *   
   if (assertionObject != null)
 {
 assertionobjectslist = assertionObject.getValidationObjects();
 String StationNumber = ((BillingRecord) 
 assertionObject.get(0)).getStationNo();
 System.out.println(Station Number in assertion object is  
 + StationNumber);
 }
 else
 {
 System.out.println(Assertion Object is null);
 }
 System.out.println(The number of objects in assertionobject is 
  + assertionobjectslist.size());
 
 try
 {
 StatefulKnowledgeSession ksession = 
 kbase.newStatefulKnowledgeSession();
 *//the next line throws the exception*
 ksession.insert(assertionObject);
 
 ksession.fireAllRules();
 ksession.dispose();
 
 }
 catch (RuntimeDroolsException e1)
 {
 throw new BusinessRuleException(e1.getMessage());
 }
 
 businessRulesErrors = assertionObject.getBusinessRulesErrors();
 
 if (throwException)
 {
 if (!assertionObject.getBusinessRulesErrors().isEmpty())
 {
 throw new BusinessRuleException(businessRulesErrors);
 }
 }
 }
 
 
 Any help is appreciated. thanks
 
 
 
 
 ___
 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] MySQL and Derby issues with Guvnor

2009-07-31 Thread Jaroslaw Kijanowski
Hi,
  when this doesn't help
  then post your repository.xml file.

Cheers,
  Jarek

Bhamidi, Krishna wrote:
 Delete the repository directory on the server domainroot. Delete all 
 tables in the database created by guvnor , and try to bring up guvnor 
 again, it shouls come up.
 
 
 *From:* rules-users-boun...@lists.jboss.org 
 [mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *Sumant Kumar
 *Sent:* Thursday, July 30, 2009 5:12 PM
 *To:* Rules Users List
 *Subject:* [rules-users] MySQL and Derby issues with Guvnor
 
 Hi ,
 
 I have changed the defualt Derby DB to MySQL  DB for the JacRabbit in 
 Guvnor. I see this below exception when I try to bring up the JBOSS AS 
 and Guvnor.
 
 Any idea what is the issue
 
 2009-07-30 16:58:09,499 INFO  [STDOUT] (main) ERROR 30-07 16:58:09,499 
 (BundleDbPersistenceManager.java:storeBundle:1270) failed to write 
 bundle: cafebabe-cafe-babe-cafe-babecafebabe
 ERROR 23505: The statement was aborted because it would have caused a 
 duplicate key value in a unique or primary key constraint or unique 
 index identified by 'SQL090729054055150' defined on 'DEFAULT_BUNDLE'.
 
 Is there a way to get rid of JacRabbit and use more robust 
 Implemenentation of JCR.
 
 
 
 
 ___
 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] Import Existing DRL in Guvnor never finishes

2009-07-29 Thread Jaroslaw Kijanowski
Hi,
  what version? 5.0.1.GA?
Have you changed Jackrabbit's backend or are you using the default settings?

Cheers,
  Jarek

Steve Ronderos wrote:
 
 Hello All,
 
 I'm experiencing an issue importing an existing DRL into Guvnor, we 
  made a sample DRL file containing 1000 very simple rules that look 
 something like this:
 
 rule testa4
 dialect mvel
 when
 IOption( selected == false  id == 9934 )
 messageSection : INode( id == Drivers )
 then
 messageSection.setValidationMessage( null );
 messageSection.setValidationMessageDuration( null );
 end
 
 Each rule has a unique name.  The problem is that the import hasn't 
 finished (after over 2 hours) and when we look at the resources that 
 have been imported they have 24 revisions each.  It looks like Guvnor is 
 importing the file over and over again.
 
 Has anyone experienced anything like this?
 
 Thanks,
 
 Steve Ronderos
 
 
 
 
 ___
 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] error in writing test scenarios

2009-07-29 Thread Jaroslaw Kijanowski
Hi,
  please provide some more details. Maybe a screen shot of your test 
scenario would do.
It might be also useful to see your rules.

Cheers,
  Jarek

VÅM§Ï ® wrote:
 Hi ,
 While writing the test scenarios,after pressing run scenario button i m 
 getting the below error in the server and showing an alert technical 
 error  in the front end .
  
 at java.lang.Thread.run(Thread.java:595)
  Caused by: java.lang.reflect.InvocationTargetException
  
 please tel me reason behind that .
 regards,
 Vamsi Krishna.Kavuri.
 http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html
 
 
 
 
 ___
 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] Import Existing DRL in Guvnor never finishes

2009-07-29 Thread Jaroslaw Kijanowski
Do you see the same issue when using the Jackrabbit's built-in Derby DB?

Steve Ronderos wrote:
 
 Sorry, I probably should have included that information.
 
 We are using 5.0.1.GA, Jackrabbit is configured to store the data in an 
 Oracle database.  Is there any other information I can provide?
 
 Thanks,
 
 Steve Ronderos
 
 rules-users-boun...@lists.jboss.org wrote on 07/29/2009 01:33:31 AM:
 
   [image removed]
  
   Re: [rules-users] Import Existing DRL in Guvnor never finishes
  
   Jaroslaw Kijanowski
  
   to:
  
   Rules Users List
  
   07/29/2009 01:39 AM
  
   Sent by:
  
   rules-users-boun...@lists.jboss.org
  
   Please respond to Rules Users List
  
   Hi,
 what version? 5.0.1.GA?
   Have you changed Jackrabbit's backend or are you using the default 
 settings?
  
   Cheers,
 Jarek
  
   Steve Ronderos wrote:
   
Hello All,
   
I'm experiencing an issue importing an existing DRL into Guvnor, we
 made a sample DRL file containing 1000 very simple rules that look
something like this:
   
rule testa4
dialect mvel
when
IOption( selected == false  id == 9934 )
messageSection : INode( id == Drivers )
then
messageSection.setValidationMessage( null );
messageSection.setValidationMessageDuration( null );
end
   
Each rule has a unique name.  The problem is that the import hasn't
finished (after over 2 hours) and when we look at the resources that
have been imported they have 24 revisions each.  It looks like 
 Guvnor is
importing the file over and over again.
   
Has anyone experienced anything like this?
   
Thanks,
   
Steve Ronderos
   
   

 
   
___
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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Relation between Guvnor and Expert in Drools5.0

2009-07-29 Thread Jaroslaw Kijanowski
Hi,

Sumant Kumar wrote:
 Thanks Vijay.
 
 I think I have few more questions. 
 
 1) Does Guvnor include the runtime or Rule engine it self ? I could 
 create rule and execute it in Guvnor so does this mean it has Expert 
 included in it.

Yes (you can have a look at the WEB-INF/lib dir to see what exactly is 
shipped).

 
 2) When a end user/app executes/fires a rule where is the rule runtime, 
 is it the client JVM or  Guvnor JVM ?
 In other words are rules executed in Guvnor that are packaged and made 
 available on Guvnor or will they be marshalled
 to the client calling the rule and executed in client JVM. 

Rules are only executed in Guvnor when run in a test scenario.
Rules are exposed by Guvnor in form of compiled packages. You can use 
them in your local Drools application through a Drools Agent [1].

 
 3) Can you give an example of Drools5.0 deployment pattern. How 
 Guvnor,Expert and J2EE app will communicate.
One option is the Drools Agent.

Cheers,
  Jarek

[1] 
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-guvnor/html_single/index.html#d0e1053

 
 thanks
 Sumant
 
 
 *From:* Vijay Pandey vpan...@mdes.ms.gov
 *To:* Rules Users List rules-users@lists.jboss.org
 *Sent:* Tuesday, July 28, 2009 5:52:07 PM
 *Subject:* Re: [rules-users] Relation between Guvnor and Expert in Drools5.0
 
 Guvnor à This can be used to manage your rules specifically termed as 
 BRMS (Business Rules Management System). This can really play its part 
 from the “governance” perspective in your company/enterprise/project. 
 Take a look at this URL 
 http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-guvnor/html_single/index.html#d0e78
  
 mainly section 1.1.1
 
  
 
 Expert à This is the actual runtime/development module for the rule engine.
 
  
 
 Take a look at this part (*Chapter 3 – Installation and Setup*) of the 
 documentation 
 http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html_single/index.html#d0e1322
  
 this should help your understanding of various jars and the modules
 
  
 
 Regards,
 
 Vijay
 
 
 
 *From:* rules-users-boun...@lists.jboss.org 
 [mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *Sumant Kumar
 *Sent:* Tuesday, July 28, 2009 4:35 PM
 *To:* Rules Users List
 *Subject:* [rules-users] Relation between Guvnor and Expert in Drools5.0
 
  
 
 Hi All,
 
  
 
 Can you throw some light on Relation between Guvnor and
 
  Expert components in Drools5.0.
 
 
 
 Guvnor sounds like BRMS so does it have Rule engine ( or runtime) to 
 execute rules ?. Is Expert module part of Guvnor ?
 
 
 
 If Guvnor doesn't have rule engine how does it excute rule when we do QA.
 
 
 
 I cannot find Expert module for down load. Is Rule engine runtime bunch 
 of jars ( Drools-core.jar etc )
 
 
 
 thanks
 
 Sumant
 
  
 
 
 
 
 
 ___
 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] Import Existing DRL in Guvnor never finishes

2009-07-29 Thread Jaroslaw Kijanowski
Ok, last thing, can you post your repository.xml file? When that is 
fine, then I would blame everything else than Guvnor (connection, 
oracle, ...).
BTW, which version of Oracle?

Steve Ronderos wrote:
 
 The same import worked on a fresh stand-alone version of Guvnor v. 
 5.0.1.GA which is using Jackrabbit's built in Derby DB.
 
 Steve Ronderos
 
 rules-users-boun...@lists.jboss.org wrote on 07/29/2009 10:53:41 AM:
 
   [image removed]
  
   Re: [rules-users] Import Existing DRL in Guvnor never finishes
  
   Jaroslaw Kijanowski
  
   to:
  
   Rules Users List
  
   07/29/2009 10:57 AM
  
   Sent by:
  
   rules-users-boun...@lists.jboss.org
  
   Please respond to Rules Users List
  
   Do you see the same issue when using the Jackrabbit's built-in Derby DB?
  
   Steve Ronderos wrote:
   
Sorry, I probably should have included that information.
   
We are using 5.0.1.GA, Jackrabbit is configured to store the data 
 in an
Oracle database.  Is there any other information I can provide?
   
Thanks,
   
Steve Ronderos
   
rules-users-boun...@lists.jboss.org wrote on 07/29/2009 01:33:31 AM:
   
  [image removed]
 
  Re: [rules-users] Import Existing DRL in Guvnor never finishes
 
  Jaroslaw Kijanowski
 
  to:
 
  Rules Users List
 
  07/29/2009 01:39 AM
 
  Sent by:
 
  rules-users-boun...@lists.jboss.org
 
  Please respond to Rules Users List
 
  Hi,
what version? 5.0.1.GA?
  Have you changed Jackrabbit's backend or are you using the default
settings?
 
  Cheers,
Jarek
 
  Steve Ronderos wrote:
  
   Hello All,
  
   I'm experiencing an issue importing an existing DRL into 
 Guvnor, we
made a sample DRL file containing 1000 very simple rules that 
 look
   something like this:
  
   rule testa4
   dialect mvel
   when
   IOption( selected == false  id == 9934 )
   messageSection : INode( id == Drivers )
   then
   messageSection.setValidationMessage( null );
   messageSection.setValidationMessageDuration( null );
   end
  
   Each rule has a unique name.  The problem is that the import 
 hasn't
   finished (after over 2 hours) and when we look at the 
 resources that
   have been imported they have 24 revisions each.  It looks like
Guvnor is
   importing the file over and over again.
  
   Has anyone experienced anything like this?
  
   Thanks,
  
   Steve Ronderos
  
  
  

 
  
   ___
   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 mailing list
   rules-users@lists.jboss.org
   https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Relation between Guvnor and Expert in Drools5.0

2009-07-29 Thread Jaroslaw Kijanowski
Sumant Kumar wrote:
 Thank you Jarek.
 
 Where does Drools Expert component fit in. Is Drools EXPERT essentially 
  drools-api.jar and drools-core.jar and some other dependent jars ?.

Almost.

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-introduction/html_single/index.html#d0e1337

I guess all you need (the engine for now) is in Drools 5.0 Binaries

http://jboss.org/drools/downloads.html



You might be also interested in the latest bits from trunk:

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/

 
 I am not sure why Jboss is not wraping them as component and call it Expert.
 
 
 thanks
 Sumant
 
 
 
 
 *From:* Jaroslaw Kijanowski kijanow...@gmail.com
 *To:* Rules Users List rules-users@lists.jboss.org
 *Sent:* Wednesday, July 29, 2009 12:09:40 PM
 *Subject:* Re: [rules-users] Relation between Guvnor and Expert in Drools5.0
 
 Hi,
 
 Sumant Kumar wrote:
   Thanks Vijay.
  
   I think I have few more questions.
  
   1) Does Guvnor include the runtime or Rule engine it self ? I could
   create rule and execute it in Guvnor so does this mean it has Expert
   included in it.
 
 Yes (you can have a look at the WEB-INF/lib dir to see what exactly is
 shipped).
 
  
   2) When a end user/app executes/fires a rule where is the rule runtime,
   is it the client JVM or  Guvnor JVM ?
   In other words are rules executed in Guvnor that are packaged and made
   available on Guvnor or will they be marshalled
   to the client calling the rule and executed in client JVM.
 
 Rules are only executed in Guvnor when run in a test scenario.
 Rules are exposed by Guvnor in form of compiled packages. You can use
 them in your local Drools application through a Drools Agent [1].
 
  
   3) Can you give an example of Drools5.0 deployment pattern. How
   Guvnor,Expert and J2EE app will communicate.
 One option is the Drools Agent.
 
 Cheers,
   Jarek
 
 [1]
 https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-guvnor/html_single/index.html#d0e1053
 
  
   thanks
   Sumant
  
   
   *From:* Vijay Pandey vpan...@mdes.ms.gov mailto:vpan...@mdes.ms.gov
   *To:* Rules Users List rules-users@lists.jboss.org 
 mailto:rules-users@lists.jboss.org
   *Sent:* Tuesday, July 28, 2009 5:52:07 PM
   *Subject:* Re: [rules-users] Relation between Guvnor and Expert in 
 Drools5.0
  
   Guvnor à This can be used to manage your rules specifically termed as
   BRMS (Business Rules Management System). This can really play its part
   from the “governance” perspective in your company/enterprise/project.
   Take a look at this URL
 
 http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-guvnor/html_single/index.html#d0e78
  
 
   mainly section 1.1.1
  
   
  
   Expert à This is the actual runtime/development module for the rule 
 engine.
  
   
  
   Take a look at this part (*Chapter 3 – Installation and Setup*) of the
   documentation
 
 http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html_single/index.html#d0e1322
  
 
   this should help your understanding of various jars and the modules
  
   
  
   Regards,
  
   Vijay
  
   
  
   *From:* rules-users-boun...@lists.jboss.org 
 mailto:rules-users-boun...@lists.jboss.org
   [mailto:rules-users-boun...@lists.jboss.org 
 mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *Sumant Kumar
   *Sent:* Tuesday, July 28, 2009 4:35 PM
   *To:* Rules Users List
   *Subject:* [rules-users] Relation between Guvnor and Expert in Drools5.0
  
   
  
   Hi All,
  
   
  
   Can you throw some light on Relation between Guvnor and
  
Expert components in Drools5.0.
  
  
  
   Guvnor sounds like BRMS so does it have Rule engine ( or runtime) to
   execute rules ?. Is Expert module part of Guvnor ?
  
  
  
   If Guvnor doesn't have rule engine how does it excute rule when we do QA.
  
  
  
   I cannot find Expert module for down load. Is Rule engine runtime bunch
   of jars ( Drools-core.jar etc )
  
  
  
   thanks
  
   Sumant
  
   
  
  
  
   
  
   ___
   rules-users mailing list
   rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org
   https://lists.jboss.org/mailman/listinfo/rules-users
 ___
 rules-users mailing list
 rules-users@lists.jboss.org mailto: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

Re: [rules-users] Webguided decision table and nested objects

2009-07-23 Thread Jaroslaw Kijanowski
Hi,
  just write this in the 'Field' box: address.street - sure, it's not 
perfect (the GUI doesn't let you go deeper and provide the proper fields 
to choose), but it's possible.

Cheers,
  Jarek

Wishing Carebear wrote:
 Hello:
 I have a facts objects with nested objects : example:
  Employee
  name
  Address
   street
   city
 
 
 Wondering if it is possible to use Webguided decision table at the 
 nested object level (in the above example Address.street)
 
 Thanks,
 cabear
 
 
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Govnor DB configuration

2009-07-17 Thread Jaroslaw Kijanowski
pardeep.ru...@lntinfotech.com wrote:
 
 Hi,
 Thanks Jarek for your reply.
 Still I have one doubt in my mind, how can I see the data for a newly 
 registered user (i.e name  permission )
 created through Drools Guvnor  administrator functionality.  Where 
 should I find the new user data(i.e. name   permission assigned) , so that
 I can write synch service to synch data from Drools Guvnor table to 
 OFBiz table.

I don't know where/how Jackrabbit persists the data in a DB. Moreover 
I'm not sure if you should rely on this data (format, location where 
it's stored). But that's just my opinion ;)
 
 Please help me to through out from this problem.
 
 Thanks  Regards
 
 Pardeep Ruhil
 LT Infotech Ltd
 Mumbai
 Ph: +919820283884
 
 
 pardeep.ru...@lntinfotech.com wrote:
  
   Hi,
   I am using Apache OFBiz and had successfully integrated Drools Guvnor
   war file with OFBiz.
   By default Drools Guvnor supports Embedded derby, but in OFBiz i am
   using MYSql , so i changed
   the default embedded derby to MySql using repository.xml file by the
   following code.
  
   PersistenceManager
   
 class=org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager
  
 
  
 param name=url
   value=jdbc:mysql://localhost:3306/drools/
 param name=user value=root /
 param name=password value=Newuser123 /
 param name=schema value=mysql/
 param name=schemaObjectPrefix value=${wsp.name}_/
   /PersistenceManager
  
   Using this I successfully integrated Drools guvnor with same database as
   I am using for OFBiz(MySql).
  
   Now I have created a new user in Drools guvnor to create permission for
   that user, but I am not able to see
   where that username is stored in the database and in which entity or
   table of MySql.
  
   Also if i want to use the users available in OFBiz MySql database
entity say 'Userlogin' where i am storing all the list of userlogins,
   how can
   I retrieve the same and use this table data in drools Guvnor.
 
 This can be done via JAAS - you just need to configure it to use a
 particular table in mysql for retrieving user logins/passwords.
 Keep in mind that this is just for authentication (to login).
 Here's a list of all available login modules:
 http://www.jboss.org/community/wiki/LoginModule
 http://www.jboss.org/community/wiki/DatabaseServerLoginModule
 
   Also when
   I make a new user in Drools Govnor through
   administrator, my data of new user should go to  table 'UserLogin'.
 
 AFAICT that's not possible and you need to synch your Guvnor user list
 with the OFBiz user list by yourself.
 
 Cheers,
  Jarek
  
   Please help me how this can be achieved in Drools Guvnor.
  
   Thanks  Regards
  
   Pardeep Ruhil
   LT Infotech Ltd
   Mumbai
   Ph: +919820283884
   *
   Larsen  Toubro Infotech Ltd.*_
   __www.Lntinfotech.com_ http://www.lntinfotech.com/
  
   This Document is classified as:
  
   LT Infotech Proprietary   LT Infotech Confidential   LT Infotech
   Internal Use Only   LT Infotech General Business  
  
   This Email may contain confidential or privileged information for the
   intended recipient (s) If you are not the intended recipient, please do
   not use or disseminate the information, notify the sender and delete it
   from your system.
 
 __
 
 
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 http://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
http://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Getting hold of the Evaluator Registry

2009-07-16 Thread Jaroslaw Kijanowski
On Linux, when I created my own accumulate functions, I had to put this 
file in my home directory to have it picked up by Eclipse.

Cheers,
  Jarek

Edson Tirelli wrote:
 
root of your project classpath, not root of your project.
 
[]s
Edson
 
 2009/7/15 Asif Iqbal asif.iq...@infor.com mailto:asif.iq...@infor.com
 
 Hi Edson,
 
  
 
 I have gone away and tried the properties method of adding the
 customEvaluator, which worked fine for the code.  But my IDE still
 does not pick it up. Any ideas?
 
  
 
 Do I need to place it in a META-INF folder in the root of the project?
 
  
 
 I have the following in the drools.packagebuilder.conf file.
 
  
 
 
 drools.evaluator.custom=com.infor.audit.bpr.component.validation.impl.drools.CustomComparableEvaluatorsDefinition
 
  
 
 thanks..
 
  
 
  
 
 
 
 *From:* rules-users-boun...@lists.jboss.org
 mailto:rules-users-boun...@lists.jboss.org
 [mailto:rules-users-boun...@lists.jboss.org
 mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of *Edson
 Tirelli
 
 *Sent:* 15 July 2009 14:57
 *To:* Rules Users List
 *Subject:* Re: [rules-users] Getting hold of the Evaluator Registry
 
  
 
 
Yes, you are in the right track, and I understand this is a bit
 confusing at first. One more reason for people to go to the October
 Rules Fest 2009 where I will give a presentation on all the ways to
 extend the engine to solve specific problems. It will be interesting
 I hope (last year was awesome) and even Charles Forgy will be there
 doing a presentation on Parallel Rete. :)
 
 Meanwhile I will write a tutorial on this, but just to help you
 there, your approach is correct, except that you don't need to setup
 the option for each operator. It works like this:
 
 * One EvaluatorDefinition class implements support to one or more
 evaluators, defined by the method public String[] getEvaluatorIds().
 
 * All you need to do, then, is wire you class once and the engine
 will pick-up all the IDs supported by that class. When you have your
 class wired, you give it a unique string identifier, so that if you
 ever need to replace it, or remove it, you will use that id.
 Sometimes we use the operator as the ID, but usually it is something
 that reminds you of the kind of evaluators that class define. For
 instance, drools registers the ComparableEvaluatorsDefinition in
 this way:
 
 drools.evaluator.comparable =
 org.drools.base.evaluators.ComparableEvaluatorsDefinition
 
   So in this case, comparable is the identifier. Finally, from my
 previous e-mail you will see that the reason that the eclipse IDE is
 still giving you errors is that you are using the API to configure
 the evaluators. Just move the configuration to the configuration
 file and the IDE will pick it up.
 
[]s
Edson
 
 
 2009/7/15 Asif Iqbal asif.iq...@infor.com
 mailto:asif.iq...@infor.com
 
 Edson,
 
  
 
 What I have done so far is created a
 CustomComparableEvaluatorsDefinition, which is exactly the same as
 the default ComparableEvaluatorsDefinition apart form having support
 for strings, which I have done by creating
 StringGreaterOrEqualEvaluators and added that in my custom class,
 using the addEvaluatorFunction :-
 
  
 
 addEvaluator( ValueType.SHORT_TYPE,
 Operator.GREATER, ShortGreaterEvaluator.INSTANCE );
 
 addEvaluator( ValueType.SHORT_TYPE,
 Operator.GREATER_OR_EQUAL,ShortGreaterOrEqualEvaluator.INSTANCE );
 
 addEvaluator( ValueType.PSHORT_TYPE,   
 Operator.LESS,ShortLessEvaluator.INSTANCE );
 
 addEvaluator( ValueType.PSHORT_TYPE,   
 Operator.LESS_OR_EQUAL,   ShortLessOrEqualEvaluator.INSTANCE );
 
 addEvaluator( ValueType.PSHORT_TYPE,   
 Operator.GREATER, ShortGreaterEvaluator.INSTANCE );
 
 addEvaluator( ValueType.PSHORT_TYPE,   
 Operator.GREATER_OR_EQUAL,ShortGreaterOrEqualEvaluator.INSTANCE );
 
 //Custom additions
 
 addEvaluator( ValueType.STRING_TYPE,   
 Operator.LESS,StringLessEvaluator.INSTANCE );
 
 addEvaluator( ValueType.STRING_TYPE,   
 Operator.LESS_OR_EQUAL,   StringLessOrEqualEvaluator.INSTANCE );
 
 addEvaluator( ValueType.STRING_TYPE,   
 Operator.GREATER, StringGreaterEvaluator.INSTANCE );
 
 addEvaluator( ValueType.STRING_TYPE,   
 Operator.GREATER_OR_EQUAL,StringGreaterOrEqualEvaluator.INSTANCE );
 
  
 
 Now Im am trying to wire it, with the following..
 
  
 
   

Re: [rules-users] OFBiz entity engine compatibility with Jackrabbit

2009-07-16 Thread Jaroslaw Kijanowski
Hi

pardeep.ru...@lntinfotech.com wrote:
 
 Hi,
 
 I am using apache OFBiz which uses Entity engine as a persistence layer.
 To know more about Entity engine refer this link
 http://ofbiz.apache.org/docs/entity.html
 Drools Guvnor uses Jackrabbit as a persistence layaer.
 So my question is there a way i can use OFbiz entity engine persistence 
 layer in Drools guvnor in place of
 Jackrabbit.

Jackrabbit is a JCR, OFBiz isn't, right? You should be able to replace 
Jackrabbit with any JCR implementation. IMO OFBiz is not an option.

 Is it feasible to do this and if possible how much effort is needed?

Haven't heard of anybody replacing Jackrabbit with another JCR 
implementation before - share your experience when you try :)

Cheers,
  Jarek

 
 
 Thanks  Regards
 
 Pardeep Ruhil
 LT Infotech Ltd
 Mumbai
 Ph: +919820283884
 *
 Larsen  Toubro Infotech Ltd.*_
 __www.Lntinfotech.com_ http://www.lntinfotech.com/
 
 This Document is classified as:
 
 LT Infotech Proprietary   LT Infotech Confidential   LT Infotech 
 Internal Use Only   LT Infotech General Business  
 
 This Email may contain confidential or privileged information for the 
 intended recipient (s) If you are not the intended recipient, please do 
 not use or disseminate the information, notify the sender and delete it 
 from your system.
 __
 
 
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 http://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
http://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Govnor DB configuration

2009-07-16 Thread Jaroslaw Kijanowski
Hi,

pardeep.ru...@lntinfotech.com wrote:
 
 Hi,
 I am using Apache OFBiz and had successfully integrated Drools Guvnor 
 war file with OFBiz.
 By default Drools Guvnor supports Embedded derby, but in OFBiz i am 
 using MYSql , so i changed
 the default embedded derby to MySql using repository.xml file by the 
 following code.
 
 PersistenceManager 
 class=org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager
  
 
   param name=url 
 value=jdbc:mysql://localhost:3306/drools/
   param name=user value=root /
   param name=password value=Newuser123 /
   param name=schema value=mysql/
   param name=schemaObjectPrefix value=${wsp.name}_/
 /PersistenceManager
 
 Using this I successfully integrated Drools guvnor with same database as 
 I am using for OFBiz(MySql).
 
 Now I have created a new user in Drools guvnor to create permission for 
 that user, but I am not able to see
 where that username is stored in the database and in which entity or 
 table of MySql.
 
 Also if i want to use the users available in OFBiz MySql database 
  entity say 'Userlogin' where i am storing all the list of userlogins, 
 how can
 I retrieve the same and use this table data in drools Guvnor.

This can be done via JAAS - you just need to configure it to use a 
particular table in mysql for retrieving user logins/passwords.
Keep in mind that this is just for authentication (to login).
Here's a list of all available login modules:
http://www.jboss.org/community/wiki/LoginModule
http://www.jboss.org/community/wiki/DatabaseServerLoginModule

 Also when 
 I make a new user in Drools Govnor through
 administrator, my data of new user should go to  table 'UserLogin'.

AFAICT that's not possible and you need to synch your Guvnor user list 
with the OFBiz user list by yourself.

Cheers,
  Jarek
 
 Please help me how this can be achieved in Drools Guvnor.
 
 Thanks  Regards
 
 Pardeep Ruhil
 LT Infotech Ltd
 Mumbai
 Ph: +919820283884
 *
 Larsen  Toubro Infotech Ltd.*_
 __www.Lntinfotech.com_ http://www.lntinfotech.com/
 
 This Document is classified as:
 
 LT Infotech Proprietary   LT Infotech Confidential   LT Infotech 
 Internal Use Only   LT Infotech General Business  
 
 This Email may contain confidential or privileged information for the 
 intended recipient (s) If you are not the intended recipient, please do 
 not use or disseminate the information, notify the sender and delete it 
 from your system.
 __
 
 
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 http://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
http://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Guvnor integration with MySql

2009-07-15 Thread Jaroslaw Kijanowski

http://blog.athico.com/2008/08/tuning-guvnor.html
http://jackrabbit.apache.org/jackrabbit-configuration.html

Cheers,
 Jarek

pardeep.ru...@lntinfotech.com wrote:


Hi,

I want to integrate the Drools Govnor with extenal Database (MySql).
Can anyone help me how can i do the settings to connect to the extenal 
database.


Thanks  Regards

Pardeep Ruhil
LT Infotech Ltd
Mumbai
Ph: +919820283884
*
Larsen  Toubro Infotech Ltd.*_
__www.Lntinfotech.com_ http://www.lntinfotech.com/

This Document is classified as:

LT Infotech Proprietary   LT Infotech Confidential   LT Infotech 
Internal Use Only   LT Infotech General Business  

This Email may contain confidential or privileged information for the 
intended recipient (s) If you are not the intended recipient, please do 
not use or disseminate the information, notify the sender and delete it 
from your system.

__




___
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] role based authentication in tomcat

2009-07-15 Thread Jaroslaw Kijanowski

Hi,
 so far you have just created a name for your jaas configuration, 
called brms. If you would use JBoss AS, you would need to create a 
jaas config in server/default/conf/login-config.xml. Details are here:

http://blog.athico.com/2008/08/tuning-guvnor.html

Keep in mind that you use JAAS only for *authentication*. Authorization 
is set in Guvnor (Administration tab).
Before you start, you also need to create an account in Guvnor that has 
admin rights, otherwise you will be able to login (authentication via 
JAAS) but nothing more (authorization via Guvnor).


Cheers,
 Jarek


VÅM§Ï ® wrote:

Hi,

I configured my guvnor in tomcat 6.0.It http://6.0.It is working fine 
with out any  user name validation.now i just want to create a role and 
give permission to that role.

In the components.xml i have changed like the below configuration

security:role-based-permission-resolver 
enable-role-based-authorization=true/
security:identity authenticate-method=#{authenticator.authenticate} 
jaas-config-name=brms/


now where i need to create a role with that name brms and where i need 
mention the username and password.

i tried in the tomcat-users.xml but it is not working.

 could anyone please help me..

regards,
Vamsi Krishna.Kavuri.
http://www.brainyquote.com/quotes/authors/g/gilda_radner.html




___
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] Guvnor deployment pattern

2009-07-15 Thread Jaroslaw Kijanowski

Hi,

rviswanathan wrote:

Hi,
I would like to understand the deployment pattern supported by Guvnor. 
Everytime when I add the rules or model objects on Guvnor those files are
checked in on SVN repository.  


1.) Where exactly those files are stored?


Out of the box it's stored in Jackrabbit's built in Derby data base (in 
files).


2.) In case of SVN, Which SVN repository (What’s the URL)? 


It's a JCR repository, not SVN.


3.) Is it possible to define the list of rules on Guvnor  use those rules
across the application wherever drools-guvnor.war is deployed?  If so, what
all steps need to be followed?


Yes, all rules are stored in a repository, by default located in the 
JBoss AS bin directory.
So you can either copy the repository dir and repository.xml file to 
another JBoss instance, or you can export your data (Administration tab) 
and import it again in the new Guvnor.




Thanks,
Ram


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


Re: [rules-users] agenda-group and decision tables

2009-07-15 Thread Jaroslaw Kijanowski
I think it's because AGENDA-GROUP isn't considered at all, filed 
JBRULES-2208.



k...@chryslerfinancial.com wrote:


I thought so but when I upload the .xls to Guvnor and view the source I 
do not see it.  I have it like this in my spreadsheet:




Any ideas would be appreciated.  


Thanks

Kent Symanzik



*David Sinclair dsincl...@chariotsolutions.com*
Sent by: rules-users-boun...@lists.jboss.org

05/22/2009 12:30 PM
Please respond to
Rules Users List rules-users@lists.jboss.org



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

Subject
Re: [rules-users] agenda-group and decision tables








Yes it is via the AGENDA-GROUP and RULEFLOW-GROUP keywords. The keyword 
must appear at the top of a column, then which group to place a rule in 
per row.


2009/5/22 _k...@chryslerfinancial.com_ 
mailto:k...@chryslerfinancial.com


Is agenda-group or ruleflow-group supported in decision tables ?

Kent Symanzik

___
rules-users mailing list_
__rules-us...@lists.jboss.org_ mailto: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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor web based decision table

2009-07-15 Thread Jaroslaw Kijanowski

Johan Kumps wrote:

Hi,
Johan Kumps wrote:

Hi all,
 I've a number of Excel based decision tables running in my
applications. Now I want to use Guvner to manage these rules.
Only importing the xsl files is not enough. So I have to
manually convert the xsl's to a web based decision table.


Why do you need to convert them into web based DTs? What's the
problem if you simply upload your xls file? Keep in mind that you
also have to provide (upload) a model used in your DT. 

 
 I want to convert my excel decision table to enable busines users to 
update the rules when neccessary.


I see, and I guess, it's not possible for those users to update rules in 
OpenOffice/Excel and upload them to Guvnor? See my answers below, but 
they won't satisfy you ;)



 I have following questions :
 - How do have have to use an eval condition? Whitin the eval I
have to call a piece of java code with a number of parameters
coming from the fact model.


simply write a snippet in a cell

 


  In Govnor?


AFAICT that's not possible in web based DTs. Would need to be done as 
part of some 'free form drl' I guess...




- How can I prioritize rules?


use the PRIORITY keyword
 


  In Govnor?


Yep, in Guvnor, this attribute is called salience (available from the 
options section).



- How to use global variables?


use the Variables keyword

 
 


  In Govnor?


Globals are still available, but the use of them is quite limited (you 
can't add results to a java.util.List for example).






Details are in the documentation:

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e5762

  This link is not working...


Strange, works for me.





Cheers,
 Jarek

 Thanks for helping me out.
 Kind regards,
Johan Kumps




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

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





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

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


Re: [rules-users] variable binding without condition in Decision table

2009-07-14 Thread Jaroslaw Kijanowski

It should work without creating a dummy constraint, try this:

CONDITION
leave this row blank
$serviceContract:CreditServiceContract()

Cheers,
 Jarek

Hehl, Thomas wrote:
Nope, that’s how it works. I wrote it up as a defect and it got closed 
because no one seemed to think it was an issue. So, since I don’t have 
the time available to be a contributor, I decided not to complain.


 




*From:* rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] *On Behalf Of 
*k...@chryslerfinancial.com

*Sent:* Thursday, May 21, 2009 9:05 AM
*To:* Rules Users List
*Subject:* [rules-users] variable binding without condition in Decision 
table


 



I have a decision table where I need to bind a variable to use in the 
action.  The problem is that the binding does not happen unless I apply 
a condition.  What I want in the resulting rule is this:


$serviceContract: CreditServiceContract ( )

This is what I want but does not work.  The binding does not happen so 
the rule does not compile.


This works but I hate to add an arbitrary condition just to accomplish a 
binding.




I'm sure I am just missing something.  Can someone point that out?

Thanks



Kent Symanzik




___
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] Guvnor web based decision table

2009-07-14 Thread Jaroslaw Kijanowski

Hi,

Johan Kumps wrote:

Hi all,
 
I've a number of Excel based decision tables running in my applications. 
Now I want to use Guvner to manage these rules. Only importing the xsl 
files is not enough. So I have to manually convert the xsl's to a web 
based decision table.


Why do you need to convert them into web based DTs? What's the problem 
if you simply upload your xls file? Keep in mind that you also have to 
provide (upload) a model used in your DT.


 
I have following questions :
 
- How do have have to use an eval condition? Whitin the eval I have to 
call a piece of java code with a number of parameters coming from the 
fact model.


simply write a snippet in a cell


- How can I prioritize rules?


use the PRIORITY keyword


- How to use global variables?


use the Variables keyword

Details are in the documentation:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e5762

Cheers,
 Jarek

 
Thanks for helping me out.
 
Kind regards,

Johan Kumps




___
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] Creating custom selectors using the category property for deploying certain rules in guvnor

2009-07-06 Thread Jaroslaw Kijanowski

Have a look at this class:
drools-repository/src/test/java/org/drools/repository/AssetItemTest.java

The doc in the selectors.properties file is talking about properties of 
AssetItem - however, don't take it literally - a rule uses a getter, 
hence it's sufficient to have such a method in the AssetItem class 
instead of a regular field. So if you see a getStateDescription method 
you can use stateDescription - that's at least my understanding.


So looking at AssetItem and VersionableItem I see following candidates 
for a selector:

name
createdDate
versionNumber
creator
lastContributor
checkinComment
categories (java.util.List)
categorySummary (space separated string of categories)
precedingVersion
format
stateDescription
lastModified
dateEffective
dateExpired
description
succeedingVersion
content
title
disabled

Let's get back to your original question (I've answered it already in jira):
Try this out:
package org.drools.guvnor.server.selector

import org.drools.repository.AssetItem
import org.drools.repository.CategoryItem
import org.drools.guvnor.server.selector.Allow


rule 'select all rules assigned to myCategory'
dialect 'mvel'
when
  ai : AssetItem()
  CategoryItem(name == myCategory) from ai.categories
then
  insert (new Allow( ) );
end


Cheers,
 Jarek

Premkumar Stephen wrote:

Hi Jaroslaw,


I voted for https://jira.jboss.org/jira/browse/GUVNOR-109
and added the following comment:

+1 for this request.
The ability for users to choose among which selectors are available is 
awesome.


Here's an extra requirement that I am bringing forward, not sure what 
the complexity on this is:

The list will be populated based on user permissions of some kind.
ie, not all the users can deploy production rules, but all can deploy QA 
rules, for example.

 

I have also created https://jira.jboss.org/jira/browse/GUVNOR-392 for 
including categories as a field for filtering.


Regarding your tip on using the 'status' field, I was planning for the 
workaround, though it messes with the actual value of this field which i 
was planning to use.
Based on our environment, we might actually use the author field as 
currently there will not be many authors and we are tracking 
functionality by using categories anyways.


I have the following questions that are still unanswered:
1) I am trying to figure out where the code for statusDescription is?
2) You have suggested 'categorySummary'  - was wondering where these 
fields are configured.
3) the minimal documentation in selectors.properties tells only about 
the fields status, lastModified date and author, and ends with etc. 
Could one of the devs kindly post ALL the fields that could be used?


Regards,
Prem


On Wed, Jul 1, 2009 at 1:03 PM, Jaroslaw Kijanowski 
kijanow...@gmail.com mailto:kijanow...@gmail.com wrote:


Hi,
 you may vote for this one ;)
https://jira.jboss.org/jira/browse/GUVNOR-109

So far I have successfully used 'stateDescription' and 'creator',
for sample rules look at this:
https://jira.jboss.org/jira/browse/GUVNOR-108

Haven't tried to select by category - how about 'categorySummary'?

Cheers,
 Jarek

Premkumar Stephen wrote:

Hello everyone,

I am trying to create a custom selector, based on certain
properties such as categories (primary property) and others
such as status and author.

from the examples in selectors.properties, I could not see a way
to create using categories. In that file, some of the field
described are statusDescription, lastModified, creator, etc
I was trying to find the complete list of all fields that could
be used to filter the rules.

I dug into the code and came across categoryReference in
VersionableItem.java. Is this the variable that stores the category?
Since a rule can have multiple categories, how does this pan
out? Is this a Collection?

Also, where does the string statusDescription get tied in to
the status of a rule? This one throws me off, since it is a
valid field, but I cannot understand how it is being set.

If any of you could share examples where you have done custom
selectors either in java or in drl, that would be awesome.

Thanks,
Prem




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

___
rules-users mailing list
rules-users@lists.jboss.org mailto: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] Re: a technical error occurred. Please contact a system administrator.

2009-07-05 Thread Jaroslaw Kijanowski

Can you retry with Guvnor from trunk?

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/drools-5.1.0.SNAPSHOT-guvnor.zip

If you still see this issue, could you please open a jira in
https://jira.jboss.org/jira/browse/GUVNOR
and attach your repository or the model jar?

VÅM§Ï ® wrote:

/Hi Jaroslaw Kijanowski /,

Thanks for your reply.here is some my jar content.

com/aklero/db/entity/InstClient.class
com/aklero/db/entity/RiderType.class
com/aklero/db/entity/AbstractDmsDocumentDataMapping.class
com/aklero/dms/DMSIntegrator.class
com/aklero/dms/DmsXmlParser.class
com/aklero/dms/DMSBorrowerBean.class

like this i have many classes in different packages.i solved this issue 
..but in very hard way.i.e I have copied all my classes into another 
project with out any packages.i put all the classes in the same source 
folder.then i imported the new jar with out any packages into GUVNOR.it 
worked fine.


The only i did is removed the packages and keep them in single source 
folder.


Is it the right way to that...?tell me if there is any easy way...


regards,
Vamsi Krishna.Kavuri.


On Wed, Jul 1, 2009 at 5:04 PM, VÅM§Ï ® vamsi.kav...@gmail.com 
mailto:vamsi.kav...@gmail.com wrote:


Hi,
After uploading the jar file,and clicking on *save and validate
configuration*  returning an error called technical error
occurred.In the jar file i have many classes in different
packages.i m unable to find which causes this problem.

anyone please let me know the solution.

regards,
Vamsi Krishna.Kavuri.





___
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] new to drools: can't manage to find the documentation page about eclipse plugin installation

2009-07-02 Thread Jaroslaw Kijanowski

Hi,

http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html_single/index.html#d0e1371
3.1.3.3. Installing Drools plug-in from zip file
and
3.1.3.4. Drools Runtimes

You could also use the update site: Drools 5.0 Eclipse Workbench for 3.4
http://www.jboss.org/drools/downloads.html


Gab Aldian wrote:

Hi everybody

I am very sorry to ask for something so simple like this, but I just 
can't manage to find the page about how to install and use the eclipse 
plugin for drools.


there: 
http://download.jboss.org/drools/release/5.0.1.26597.FINAL/drools-5.0-eclipse-all.zip
I can find a zip file with only some jars, a licence and a dependencie 
readme, but no clue on how to install


there: http://www.jboss.org/community/wiki/JBossRules
We learn that GEF is required, and that for the installation, we have to 
refer to the manual


and there: 
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch07.html

a note says to refer to the installation chapter


Problem: I didn't find any installation chapter in the whole doc ( 
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/index.html 
) So here is my question: Where is that page that explain how to install 
that plugin? I spent a lot of time looking for it, and either it I am 
blind, or it is well hidden


Thank you very much

Aldian




___
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] streams and equality assertion behavior

2009-07-01 Thread Jaroslaw Kijanowski

Hi,
 I've configured my knowledge base to use the EQUALITY assertion behaviour.
When I insert two equal facts into the session, only one gets processed 
(objects and their fact handles are equal).
However when I insert two equal facts via streams, my rule fires twice 
(objects are equal, but their fact handles are not). Isn't equality 
assertion behaviour supported when using streams?


Here's my rule and test class:

package com.sample
import com.sample.Message;
declare Message
  @role( event )
  @timestamp( time )
end

rule r
when
  Message( $i:i) //from entry-point myStream
then
  System.out.println( $i );
end

+

public class Message {

private int i;
private Date time;
//getters, setters, hashcode, equals, constructor
}

+

public class DroolsTest {
  public static final void main(String[] args) {
try {
  KnowledgeBase kbase = readKnowledgeBase();
  StatefulKnowledgeSession ksession = 
kbase.newStatefulKnowledgeSession();


  //WorkingMemoryEntryPoint stream = 
ksession.getWorkingMemoryEntryPoint(myStream);


  Date d = new Date();
  Message message1 = new Message(1,d);
  FactHandle fh1 = ksession.insert(message1);
  //FactHandle fh1 = stream.insert(message1);
  Message message2 = new Message(1,d);
  FactHandle fh2 = ksession.insert(message2);
  //FactHandle fh2 = stream.insert(message2);

  if (message1.equals(message2)  fh1.equals(fh2)){
System.out.println(equal);
  }
  ksession.fireAllRules();
} catch (Throwable t) {
  t.printStackTrace();
}
  }

  private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl), 
ResourceType.DRL);

if (kbuilder.getErrors().size()  0) {
  throw new IllegalArgumentException(Could not parse knowledge.);
}
KnowledgeBaseConfiguration kbaseConfig = 
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

kbaseConfig.setOption(AssertBehaviorOption.EQUALITY);
kbaseConfig.setOption(EventProcessingOption.STREAM);
kbaseConfig.setOption(RemoveIdentitiesOption.YES);

KnowledgeBase kbase = 
KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);

kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
  }
}

+

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


Re: [rules-users] a technical error occurred. Please contact a system administrator.

2009-07-01 Thread Jaroslaw Kijanowski

Can you please post the content of your jar file ($ jar tf myFile.jar)?
Can you also check the server's console and post any error messages?

VÅM§Ï ® wrote:

Hi,
After uploading the jar file,and clicking on *save and validate 
configuration*  returning an error called technical error occurred.In 
the jar file i have many classes in different packages.i m unable to 
find which causes this problem.


anyone please let me know the solution.

regards,
Vamsi Krishna.Kavuri.




___
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] streams and equality assertion behavior

2009-07-01 Thread Jaroslaw Kijanowski

https://jira.jboss.org/jira/browse/JBRULES-2154

Thanks.

Edson Tirelli wrote:


 Jarowslaw,

 Could you please open a JIRA for this. I need to investigate.
 Thanks,

 Edson

2009/7/1 Jaroslaw Kijanowski kijanow...@gmail.com 
mailto:kijanow...@gmail.com


Hi,
 I've configured my knowledge base to use the EQUALITY assertion
behaviour.
When I insert two equal facts into the session, only one gets
processed (objects and their fact handles are equal).
However when I insert two equal facts via streams, my rule fires
twice (objects are equal, but their fact handles are not). Isn't
equality assertion behaviour supported when using streams?

Here's my rule and test class:

package com.sample
import com.sample.Message;
declare Message
 @role( event )
 @timestamp( time )
end

rule r
when
 Message( $i:i) //from entry-point myStream
then
 System.out.println( $i );
end

+

public class Message {

   private int i;
   private Date time;
//getters, setters, hashcode, equals, constructor
}

+

public class DroolsTest {
 public static final void main(String[] args) {
   try {
 KnowledgeBase kbase = readKnowledgeBase();
 StatefulKnowledgeSession ksession =
kbase.newStatefulKnowledgeSession();

 //WorkingMemoryEntryPoint stream =
ksession.getWorkingMemoryEntryPoint(myStream);

 Date d = new Date();
 Message message1 = new Message(1,d);
 FactHandle fh1 = ksession.insert(message1);
 //FactHandle fh1 = stream.insert(message1);
 Message message2 = new Message(1,d);
 FactHandle fh2 = ksession.insert(message2);
 //FactHandle fh2 = stream.insert(message2);

 if (message1.equals(message2)  fh1.equals(fh2)){
   System.out.println(equal);
 }
 ksession.fireAllRules();
   } catch (Throwable t) {
 t.printStackTrace();
   }
 }

 private static KnowledgeBase readKnowledgeBase() throws Exception {
   KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
   kbuilder.add(ResourceFactory.newClassPathResource(Sample.drl),
ResourceType.DRL);
   if (kbuilder.getErrors().size()  0) {
 throw new IllegalArgumentException(Could not parse knowledge.);
   }
   KnowledgeBaseConfiguration kbaseConfig =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
   kbaseConfig.setOption(AssertBehaviorOption.EQUALITY);
   kbaseConfig.setOption(EventProcessingOption.STREAM);
   kbaseConfig.setOption(RemoveIdentitiesOption.YES);

   KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);
   kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
   return kbase;
 }
}

+

Thanks,
 Jarek
___
rules-users mailing list
rules-users@lists.jboss.org mailto: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 http://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] Creating custom selectors using the category property for deploying certain rules in guvnor

2009-07-01 Thread Jaroslaw Kijanowski

Hi,
 you may vote for this one ;)
https://jira.jboss.org/jira/browse/GUVNOR-109

So far I have successfully used 'stateDescription' and 'creator', for 
sample rules look at this:

https://jira.jboss.org/jira/browse/GUVNOR-108

Haven't tried to select by category - how about 'categorySummary'?

Cheers,
 Jarek

Premkumar Stephen wrote:

Hello everyone,

I am trying to create a custom selector, based on certain properties 
such as categories (primary property) and others such as status and 
author.


from the examples in selectors.properties, I could not see a way to 
create using categories. In that file, some of the field described are 
statusDescription, lastModified, creator, etc
I was trying to find the complete list of all fields that could be used 
to filter the rules.


I dug into the code and came across categoryReference in 
VersionableItem.java. Is this the variable that stores the category?
Since a rule can have multiple categories, how does this pan out? Is 
this a Collection?


Also, where does the string statusDescription get tied in to the 
status of a rule? This one throws me off, since it is a valid field, but 
I cannot understand how it is being set.


If any of you could share examples where you have done custom selectors 
either in java or in drl, that would be awesome.


Thanks,
Prem




___
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] stream mode and DroolsStreamUtils

2009-06-30 Thread Jaroslaw Kijanowski

Hi,
 I'm using sliding windows (hence stream mode).
Here's my rule:

declare Sensor
@role (event)
end

rule 'r'
when
Number( dv:doubleValue  1 ) from accumulate(
Sensor( $v : value ) over window:length( 2 ),
average( $v ) )
then
System.out.println(dv);
end

Here's my class:

++
public class CEPTest {
  public static void main(String[] args) throws Exception {

KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(cep.drl), 
ResourceType.DRL);

if (kbuilder.getErrors().size()  0) {
  throw new IllegalArgumentException(Could not parse knowledge.);
}

KnowledgeBaseConfiguration kbaseConfig = 
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

kbaseConfig.setOption(EventProcessingOption.STREAM);
KnowledgeBase kbase = 
KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);


kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
KnowledgeBase kbase2 = (KnowledgeBase) 
DroolsStreamUtils.streamIn(DroolsStreamUtils.streamOut(kbase), null);


final StatefulKnowledgeSession ksession = 
kbase2.newStatefulKnowledgeSession();


System.out.println(T1);
ksession.insert(new Sensor(1.0));
ksession.fireAllRules();

System.out.println(T2);
ksession.insert(new Sensor(2.0));
ksession.fireAllRules();

System.out.println(T3);
ksession.insert(new Sensor(3.0));
ksession.fireAllRules();

ksession.dispose();
  }
}
++
The output is (as expected):
+++
T1
T2
1.5
T3
2.5
+++

I'm wondering why I have to use DroolsStreamUtils to get a knowledge 
base? When I use kbase (which didn't went through DroolsStreamUtils) 
instead of kbase2 to create a new session, the output will be:

+++
T1
T2
2.0
T3
3.0
+++

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


Re: [rules-users] stream mode and DroolsStreamUtils

2009-06-30 Thread Jaroslaw Kijanowski

https://jira.jboss.org/jira/browse/JBRULES-2150

Thanks.

Edson Tirelli wrote:


   Jaroslaw,

   This looks like a bug. Would you please open a JIRA and attach the 
info bellow as well as drools and mvel version used?


   Thanks,
  Edson

2009/6/30 Jaroslaw Kijanowski kijanow...@gmail.com 
mailto:kijanow...@gmail.com


Hi,
 I'm using sliding windows (hence stream mode).
Here's my rule:

declare Sensor
   @role (event)
end

rule 'r'
when
Number( dv:doubleValue  1 ) from accumulate(
   Sensor( $v : value ) over window:length( 2 ),
   average( $v ) )
then
   System.out.println(dv);
end

Here's my class:

++
public class CEPTest {
 public static void main(String[] args) throws Exception {

   KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
   kbuilder.add(ResourceFactory.newClassPathResource(cep.drl),
ResourceType.DRL);
   if (kbuilder.getErrors().size()  0) {
 throw new IllegalArgumentException(Could not parse knowledge.);
   }

   KnowledgeBaseConfiguration kbaseConfig =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
   kbaseConfig.setOption(EventProcessingOption.STREAM);
   KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);

   kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
   KnowledgeBase kbase2 = (KnowledgeBase)
DroolsStreamUtils.streamIn(DroolsStreamUtils.streamOut(kbase), null);

   final StatefulKnowledgeSession ksession =
kbase2.newStatefulKnowledgeSession();

   System.out.println(T1);
   ksession.insert(new Sensor(1.0));
   ksession.fireAllRules();

   System.out.println(T2);
   ksession.insert(new Sensor(2.0));
   ksession.fireAllRules();

   System.out.println(T3);
   ksession.insert(new Sensor(3.0));
   ksession.fireAllRules();

   ksession.dispose();
 }
}
++
The output is (as expected):
+++
T1
T2
1.5
T3
2.5
+++

I'm wondering why I have to use DroolsStreamUtils to get a knowledge
base? When I use kbase (which didn't went through DroolsStreamUtils)
instead of kbase2 to create a new session, the output will be:
+++
T1
T2
2.0
T3
3.0
+++

Thanks,
 Jarek
___
rules-users mailing list
rules-users@lists.jboss.org mailto: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 http://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] Drools Guvnor DB setup issue.

2009-06-23 Thread Jaroslaw Kijanowski

What error? Can you paste the server log?

Maybe it's the white space before 'brms' in your connection url? Maybe 
you didn't provide the driver jar?


Cheers,
 Jarek

ami...@hsenidmobile.com wrote:

hi everyone,
I had problem in setting up a Database (mysql) with Drools Guvnor. wht i 
did was put the guvnor war file into JBOSS deploy dir and it creats a 
repository.xml and repoitory  dir under bin folder.
and i change the repository.xml as following

   PersistenceManager  class  = 
org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager

param name=driver value=com.mysql.jdbc.Driver/
param name=url value=jdbc:mysql://localhost:3306/ brms/
param name=user value=brms_user/
param name=password value=brms_password/
param name=schemaObjectPrefix value=${wsp.name}_/
param name=schema value=mysql/
/PersistenceManager


but it gave some error and wont deploy.

please any have the answer please do reply me
it very very urgent i spent 2 days for this setup still i couldn't get a result

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

2009-06-19 Thread Jaroslaw Kijanowski
Can you try *the same versions* of the plugin+runtime and Guvnor. GA 
should work.


SHIMI Abdelouahad ( Prestataire ) wrote:

I was deploy Guvnor(drools-5.0.0.CR1-guvnor) as an exploded archive on
the JBoss Application Server(version jboss-4.2.3.GA).
And I was 
*	Create categories, ok

*   Create package,ok
*   Importe model, ok
*   Create rule, ok

And create a simple Drools application(with Eclipse version 3.4 and
pluging drools 5.0) that will use a package served by Guvnor:
public class GuvnorTest {

public static final void main(String[] args) {

RuleAgent agent =
RuleAgent.newRuleAgent(/Guvnor.properties);
RuleBase ruleBase = agent.getRuleBase();

WorkingMemory workingMemory =
ruleBase.newStatefulSession();

Driver d = new Driver(Jarek, 20, null);
workingMemory.insert(d);

workingMemory.fireAllRules();

for (Iterator i = workingMemory.iterateObjects();
i.hasNext();) {
 
System.out.println(i.next().getClass().getCanonicalName());

}
}

}

The properties file:
url=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package
/myNewPackage/LATEST

And When the application is run I have this Exception:

RuleAgent(default) EXCEPTION (Thu Jun 18 10:46:40 CEST 2009): null.
Stack trace should follow.
java.io.OptionalDataException
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1310)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189)
at
org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:158)
at
org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:50)
at org.drools.agent.URLScanner.readPackage(URLScanner.java:148)
at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:120)
at
org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
at
org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
at
org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
at kijanowski.eu.GuvnorTest.main(GuvnorTest.java:13)
Exception in thread main java.lang.NullPointerException
at
org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:363)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
at kijanowski.eu.GuvnorTest.main(GuvnorTest.java:13)

I am realy stuck in the middle please please please please please  help.





This e-mail and/or attachment(s) is (are) confidential and may be legally
protected. This message is addressed to the intended recipient only. If you
are not the intended recipient of the message, please notify the sender
immediately. Its contents do not constitute a commitment by the sender's
company except where provided for in a written and signed agreement between
you and sender's company. Any disclosure, use or dissemination, either in
whole or in partial, shall be prior authorized by the sender's company by
written and signed agreement. E-mail and/or attachment(s) cannot be guaranteed
to be secured or error-free as information can be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses. The sender.s
company has taken all reasonable precautions to ensure that any attachment to
this message does not contain a virus. However, the sender.s company (and not
any of its Officers, Directors, Employees or Agents) cannot be held liable for
any damages resulting from or linked to the existence of a virus. You are
therefore strongly advised to carry out all your own anti-virus checks before
opening any and all attachments to this message.


___
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] ResourceChangeNotifier and subscribeResourceChangeListener()

2009-06-08 Thread Jaroslaw Kijanowski

Hi,
 maybe this helps:
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e1123

Resource scanning is not on by default, it's a service and must be 
started, and the same is true for notification. Both can be done via the 
ResourceFactory.


Have a look at Example 3.19. Starting the Scanning and Notification 
Services


Cheers,
 Jarek

Andrew Nguyen wrote:
I am using Guvnor and have configured a change-set.xml to look towards 
http:///LATEST.  I would like to add a listener to 
ResourceChangeNotifier that will respond to detected changes.  I 
implemented the ResourceChangeListener interface and have added it via 
the subscribeResourceChangeListener() but my resourcesChanged() function 
never seems to be called.  I'm wondering if my assumption and usage of 
everything is correct...


Thanks,
Andrew
___
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] Guvnor - assigning roles to users

2009-05-06 Thread Jaroslaw Kijanowski
Hi,
 here's my understanding:
Roles are only then taken from JAAS, if you *disable* fine grained
authorization (set enable-role-based-authorization to false).
There are two roles that are available if you use JAAS: admin and non-admin.

So you can use JAAS for *authentication*, no problem. You can also use JAAS
for *authorization*, but then you have only two roles available. If you want
to use *Guvnor specific roles* for *authorization*, then you need to enable
fine grained authorization and set up all roles in Guvnor. Before you do
this you will have to create some user that is an administrator in Guvnor
using the GUI. Otherwise enabling fine grained authorization will make it
impossible to login as an administrator - JAAS will let you in, but Guvnor
will not let you do anything.



2009/5/6 Darrin Mison dmi...@redhat.com

 The Drools 5 guvnor guide states that you can specify the admin role for a
 user in your JAAS login configuration.
 It is also possible (thanks to JAAS) to define what users have the admin
 role for Guvnor

 This is also stated here:
 http://magazine.redhat.com/2008/08/12/jboss-drools-how-to-tuning-guvnor-part-1/#password

 I can't get this to work, the only way I can assign roles to users is using
 the web UI.

 Is this a bug or are the docs out of date ?  Or am I missing something ?

 *server/default/deploy/jboss-brms.war/WEB-INF/components.xml*
 security:identity authenticate-method=#{authenticator.authenticate}
 jaas-config-name=brms/
 security:role-based-permission-resolver
 enable-role-based-authorization=true/

 *server/default/conf/login-config.xml:*
   application-policy name=brms
  authentication
 login-module
 code=org.jboss.security.auth.spi.UsersRolesLoginModule flag=required
module-option
 name=usersPropertiesprops/brms-users.properties/module-option
module-option
 name=rolesPropertiesprops/brms-roles.properties/module-option
 /login-module
  /authentication
   /application-policy

 *server/default/conf/props/brms-users.properties*
 admin=admin123

 *server/default/conf/props/brms-roles.properties*
 admin=admin


 ___
 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] Guvnor Package Builds The EGT w/ver. 5.0.0 CR1

2009-05-06 Thread Jaroslaw Kijanowski
Hi,
 same happens if you update your rule in Guvnor. The rule agent won't pick
up the changes; you have to rebuild the whole package. Same for EGT. So it
looks fine to me what you're seeing.

Cheers,
 Jarek

On Wed, May 6, 2009 at 8:05 PM, Ingold, Jonathan 
jonathan.ing...@jackson.com wrote:

 Hello,

 I use Guvnor's repository to store, organize and deploy our rules.
 However Eclipse Ganymede with the Eclipse Guvnor Toolkit is used for all
 of our editing and testing.

 My question is this: After making a change to a rule (we use drls only)
 I save the local copy and commit it to Guvnor.  However, when I run a
 test class that checks to make sure these changes went into effect they
 do not. In order for the changes to truly become effective, I must
 rebuild the rule package in Guvnor.  The .properties file has
 newInstance=true which according to the comments means the RuleBase
 will be created fresh whenever there are changes.

 I would really rather not have to switch over to guvnor and rebuild the
 package anytime I make even a minor change in my rules for testing.
 Does anyone know a way around this or am I doing something foolish
 without realizing it?

 Thanks,

 Jon

 ___
 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] Error creating field accessors ... in Guvnor

2009-02-25 Thread Jaroslaw Kijanowski

Try with lower case field names.

J Michael Dean wrote:
Started new model in Guvnor and declared two fact types.  Nothing else 
involved.  Source code that is provided from Guvnor is shown below.  But 
when I try to build the package, or create a scenario, I get error 
[package configuration problem] Error creating field accessors for 
Hemodynamics for type Hemodynamics and similar error for the other 
object.  Here is the source that is available after buildling the 
snapshot (even though it refused to build):


package vasoactive.decision


declare Hemodynamics
SystolicBP: Integer
DiastolicBP: Integer
CentralVenousPressure: Integer
CurrentDopamineDosePerKg: java.math.BigDecimal
end

declare HemodynamicDecisionState
DetectedHypotension: Boolean
DetectedLowCVP: Boolean
DetectedNormotension: Boolean
DetectedHypertension: Boolean
RecommendedStartDopamine: Boolean
RecommendedDecreaseDopamine: Boolean
RecommendedIncreaseDopamine: Boolean
end


Any assistance greatly appreciated.




___
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] Getting facts from external source using 'from' and parametrized method call

2009-01-23 Thread Jaroslaw Kijanowski

Did you set the global on your session?

http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/index.html#d0e948

Cheers

Przemysław Różycki wrote:
Sorry for responsing myself, but I'm still working on it and found that 
when factSource is a fact, not global, the rule works very well. I mean, 
this rule works fine:


rule My Rule
  when
$factSrc : FactSource(  )
$fact : Fact(  ) from $factSrc.getSomeFacts(a,b,c)
  then
// do something
end

so what's the difference between invocation on global object and 
invocation on fact object? Why the first one doesn't work and the second 
one works?


Best regards,
Przemek


Przemysław Różycki pisze:

Hi,

could I ask for some advice, please, how to use a parametrized method 
call to get some data using 'from' element in LHS.


To be more precise, I would like to do something like this:

rule My Rule
  when
$fact : Fact(  ) from factSource.getSomeFacts(a,b,c)
  then
// do something
end

where factSource is for example some global and 
getSomeFacts(String,String,String) is a parametrized method that 
returns some array of Fact objects.


Unfortunately, when I try to launch the following rule I have an error:

Exception in thread main org.mvel.PropertyAccessException: unable to 
resolve property: factSource.getSomeFacts(a,b,c)
at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:295) 

at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:110) 

at 
org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:26) 

at 
org.mvel.ast.PropertyASTNode.initializePropertyNode(PropertyASTNode.java:70) 

at 
org.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:24) 


at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
at org.mvel.MVEL.executeExpression(MVEL.java:252)
at 
org.drools.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:55) 


at org.drools.reteoo.FromNode.assertTuple(FromNode.java:68)
at 
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55) 

at 
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116) 

at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22) 

at 
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)

at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at 
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at 
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:181) 

at 
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1312) 

at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:915) 

at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883) 

at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684) 


at com.sample.DroolsTest6.main(DroolsTest6.java:29)
Caused by: java.lang.NullPointerException
at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:530) 

at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:261) 


... 21 more

Documentation says:

The from Conditional Element allows users to specify a source for 
patterns to reason over. This allows the engine to reason over data 
not in the Working Memory. This could be a sub-field on a bound 
variable or the results of a method call.


so I assume that it is possible to do what I want. If not, could I ask 
for an advice of some workaround, please?


Best regards,


___
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] Guvnor deployment exception

2009-01-23 Thread Jaroslaw Kijanowski
It tries to create the file in $JBOSS_HOME/bin and this can be changed 
in components.xml


https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-guvnor/html_single/index.html#d0e127

Raphael Duarte Paiva wrote:

Hi!

I'm using JBoss 4.2.3.GA http://4.2.3.ga/ via JBoss Tools and when I try
to deploy drools-guvnor.war I get the attached stack trace.

This one draws my attention as it's the stack's base:

Caused by: java.io.FileNotFoundException: repository.xml (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.init(FileOutputStream.java:179)
at java.io.FileOutputStream.init(FileOutputStream.java:131)
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:218)

Where does it try to create the repository.xml file? Is there any way to
modify the path of this file so It would be in a folder with r/w permission
to the user?

Please forgive any grammatical/English errors!
Thanks in advance!






___
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] Getting facts from external source using 'from' and parametrized method call

2009-01-23 Thread Jaroslaw Kijanowski

And did the stack trace change? Can you post more details (drl, java src)?

Przemysław Różycki wrote:

Yes, I did. This was the first thing I've checked.

Best regards,
Przemek

Jaroslaw Kijanowski pisze:

Did you set the global on your session?

http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/index.html#d0e948 



Cheers

Przemysław Różycki wrote:
Sorry for responsing myself, but I'm still working on it and found 
that when factSource is a fact, not global, the rule works very well. 
I mean, this rule works fine:


rule My Rule
  when
$factSrc : FactSource(  )
$fact : Fact(  ) from $factSrc.getSomeFacts(a,b,c)
  then
// do something
end

so what's the difference between invocation on global object and 
invocation on fact object? Why the first one doesn't work and the 
second one works?


Best regards,
Przemek


Przemysław Różycki pisze:

Hi,

could I ask for some advice, please, how to use a parametrized 
method call to get some data using 'from' element in LHS.


To be more precise, I would like to do something like this:

rule My Rule
  when
$fact : Fact(  ) from factSource.getSomeFacts(a,b,c)
  then
// do something
end

where factSource is for example some global and 
getSomeFacts(String,String,String) is a parametrized method that 
returns some array of Fact objects.


Unfortunately, when I try to launch the following rule I have an error:

Exception in thread main org.mvel.PropertyAccessException: unable 
to resolve property: factSource.getSomeFacts(a,b,c)
at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:295) 

at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:110) 

at 
org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:26) 

at 
org.mvel.ast.PropertyASTNode.initializePropertyNode(PropertyASTNode.java:70) 

at 
org.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:24) 


at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
at 
org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)

at org.mvel.MVEL.executeExpression(MVEL.java:252)
at 
org.drools.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:55) 


at org.drools.reteoo.FromNode.assertTuple(FromNode.java:68)
at 
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55) 

at 
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116) 

at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22) 

at 
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)

at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at 
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at 
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:181) 

at 
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1312) 

at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:915) 

at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883) 

at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684) 


at com.sample.DroolsTest6.main(DroolsTest6.java:29)
Caused by: java.lang.NullPointerException
at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:530) 

at 
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:261) 


... 21 more

Documentation says:

The from Conditional Element allows users to specify a source for 
patterns to reason over. This allows the engine to reason over data 
not in the Working Memory. This could be a sub-field on a bound 
variable or the results of a method call.


so I assume that it is possible to do what I want. If not, could I 
ask for an advice of some workaround, please?


Best regards,


___
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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Re: Guvnor - bind variables not working

2008-11-25 Thread Jaroslaw Kijanowski

Hey Dave,
 attaching a screen shot, works fine on my side on FF 2.0.18 and 3.0.3. 
Please create a jira with a screen shot, if it still fails for you.


Thanks,
 Jarek

David Sinclair wrote:

This is still not working in M3

On Fri, Nov 7, 2008 at 12:39 PM, David Sinclair 
[EMAIL PROTECTED] wrote:


Has anyone had any problems with bind variables in the M2 version of Guvnor
using the business rules editor? If I try and set a bind variable for a
property, it always assigns it to the main object, not the property.

For example, if I try to write the following

Foo( bar != null)

And tried to assign the bar property the variable name $bar, Guvnor always
does this

$bar : Foo (bar != null)

I am using FireFox 3.0.3. Anyone else experience this?

dave






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


inline: bindvar.png___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] One question about Database interface

2008-07-08 Thread Jaroslaw Kijanowski

This may be helpful:
http://www.ee.pw.edu.pl/~kijanowj/index.php?site=articlesarticle=2_drools_hibernatelang=en

Cheers,
 Jarek

Senlin Liang wrote:

Thanks.  Where could I find the related manual or instructions? I
searched through the doc for drools, and the email archive, there is
really no good example or explanation on how to achieve this.

(What I want is to insert, select or delete some objects in relational
database such as mysql.)

Any information is greatly appreciated.
Thanks.

On Tue, Jul 8, 2008 at 4:20 AM, Anstis, Michael (M.) [EMAIL PROTECTED] wrote:

Have a look at an example posted earlier this week whereby somebody
(sorry I forget who) was using JPA from within a rule.

Once you understand how JPA was used then the remaining questions relate
more specifically to JPA.

As Mark says, (native) Hibernate can also be used very easily.

With kind regards,

Mike


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Senlin Liang
Sent: 08 July 2008 03:18
To: Rules Users List
Subject: [rules-users] One question about Database interface

Hi all,

Is there some convinent database interface implemented in Drools
(store and retrieve data from DBMS, such as mysql) ?

I checked the manual, and found no such information. So I am assuming
that I will have to use JDBC. Is it right?

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

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







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


Re: [rules-users] One question about Database interface

2008-07-08 Thread Jaroslaw Kijanowski

Mapping is the job of Hibernate, not Drools ;)

To be able to manage data in/from a database (persist, read,...) you 
need to configure Hibernate and one of these config steps is to provide 
the mapping.


Cheers,
 Jarek

Senlin Liang wrote:

Hi,

Thanks a lot! The information is really helpful.

One more question is that: I have to create the mapping between
objects to relational database tables, or Drools can do this
automatically (by create the tables/objects of correct types) ?

Thanks again,
Senlin

On Tue, Jul 8, 2008 at 9:30 AM, Anstis, Michael (M.) [EMAIL PROTECTED] wrote:

Hi,

Jaroslaw Kijanowski's article looks like a really good starting point
for you!

Hibernate provide Entity Manager and Annotations extensions if you want
to go the JPA route.

From a Drool's perspective you need only concern yourself with from
which is documented as:-

6.5.2.8. From

The from Conditional Element allows users to specify a source for
patterns to reason over. This allows the engine to reason over data not
in the Working Memory. This could be a sub-field on a bound variable or
the results of a method call. It is a powerful construction that allows
out of the box integration with other application components and
frameworks. One common example is the integration with data retrieved
on-demand from databases using hibernate named queries.

For information on the rest of Jaroslaw's example, you will need to read
up on Hibernate.

With kind regards,

Mike

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Senlin Liang
Sent: 08 July 2008 13:12
To: Rules Users List
Subject: Re: [rules-users] One question about Database interface

Thanks.  Where could I find the related manual or instructions? I
searched through the doc for drools, and the email archive, there is
really no good example or explanation on how to achieve this.

(What I want is to insert, select or delete some objects in relational
database such as mysql.)

Any information is greatly appreciated.
Thanks.

On Tue, Jul 8, 2008 at 4:20 AM, Anstis, Michael (M.) [EMAIL PROTECTED]
wrote:

Have a look at an example posted earlier this week whereby somebody
(sorry I forget who) was using JPA from within a rule.

Once you understand how JPA was used then the remaining questions

relate

more specifically to JPA.

As Mark says, (native) Hibernate can also be used very easily.

With kind regards,

Mike


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Senlin Liang
Sent: 08 July 2008 03:18
To: Rules Users List
Subject: [rules-users] One question about Database interface

Hi all,

Is there some convinent database interface implemented in Drools
(store and retrieve data from DBMS, such as mysql) ?

I checked the manual, and found no such information. So I am assuming
that I will have to use JDBC. Is it right?

Thanks,
Senlin Liang
___
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




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

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







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


Re: [rules-users] logging

2008-06-18 Thread Jaroslaw Kijanowski
May be you could store the names of every fired rule in a global by 
putting drools.getRule().getName() into a list on the RHS.
Then you could get all rules in your package ( pkg.getRules() ) into 
another list and diff both collections (another_list.removeAll(list) ).



Thalupula Ravi wrote:
Hi, 


How can i log that where a rule is executed or not for supplied data? If the
rule fires, in 'then' section i can have a log statement. 


How can i log that the rule is not executed??

I need to log in both scenarios.

Thanks,
Ravi Thalupula


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


Re: [rules-users] Running Drools 4 examples

2008-06-18 Thread Jaroslaw Kijanowski

Ron Kneusel wrote:

Greetings!

I am attempting to run the HelloWorld example for Drools 4.  I have Eclipse 3.3 setup on Windows with the Drools plugin.  I have created a project with the Drools examples and added all the Drools .jar files to the project.  Everything compiles.  When I initially ran HelloWorldExample.java it appeared that it could not find the HelloWorld.drl file.  


Try to add src/main/rules to your source folders on build path.

 So, I moved that file into the same directory as 
HelloWorldExample.java and ran again.  This time I am getting an error 
that the JDT compiler is not found even though it appears that there are 
JDT jar files in the Eclipse plugins.


Try to add org.eclipse.jdt.core_xxx as an external jar to your project's 
libraries.


BTW, both steps are performed by the drools plug-in when you create a 
Drools Project.




I also attempted to run this example under Linux from the command line.  In 
this case I placed all the Drools .jar files into the JRE ext folder and 
changed the source code to use the Janino compiler by adding:


It should be sufficient to have drools-compiler.jar, drools-core.jar, 
antlr-runtime.jar, mvel.jar and janino.jar in your classpath.




//  Set up for the Janino compiler, not Eclipse
System.setProperty(drools.dialect.java.compiler, JANINO);
PackageBuilderConfiguration cfg = new PackageBuilderConfiguration();
JavaDialectConfiguration javaConf = 
(JavaDialectConfiguration)cfg.getDialectConfiguration(java);

This version compiles with javac and runs with java -cp . HelloWorldExample but 
gives me an error within the compiler while compiling the .drl file:

Exception in thread main java.lang.StringIndexOutOfBoundsException: String 
index out of range: -1
at java.lang.String.substring(String.java:1938)
at 
org.drools.base.ClassTypeResolver.importClass(ClassTypeResolver.java:242)
at 
org.drools.base.ClassTypeResolver.resolveType(ClassTypeResolver.java:158)
at 
org.drools.rule.builder.dialect.mvel.MVELDialect.addImport(MVELDialect.java:257)
at 
org.drools.compiler.DialectRegistry.addImport(DialectRegistry.java:98)
at 
org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:377)
at 
org.drools.compiler.PackageBuilder.newPackage(PackageBuilder.java:350)
at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:267)
at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
at HelloWorldExample.main(HelloWorldExample.java:39)

It is dying on this line:

builder.addPackageFromDrl( source );

My version of HelloWorldExample.java the same as the given example except for 
the addition of the lines above for Janino.  My ultimate goal is to run this 
all under Linux, I am not an Eclipse user.

Any help getting this working would be greatly appreciated!

Ron



_
Introducing Live Search cashback .  It's search that pays you back!
http://search.live.com/cashback/?pkw=form=MIJAAF/publ=HMTGL/crea=introsrchcashback
___
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] Re: access to in working memory generated objects

2008-06-18 Thread Jaroslaw Kijanowski

Hi,
 it may also help to have a look at the PetStore example.

Alexander Claus wrote:
I want to use rules which shall generate as a consequence a new java 
object.

The GUI of my application shall display the new generated objekt.
but how can the GUI of my application get informed by the rule engine 
that
it has generated a new object (Warning)? And how the GUI or any other 
java

component can access this new generated object from outside?


Have a look at org.drools.event.WorkingMemoryEventListener.
I think you find yourself how to use it.

Best regards.
Alexander Claus
___
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] how to write regular expressions in drools..

2008-05-30 Thread Jaroslaw Kijanowski

Hi,
 you have to escape characters with regexp meaning (see docs for details).
Try this:
email matches @\[A-Za-z0-9\]*
phone not matches d{3}-d{3}-d{4}

Moreover I guess your rule is anyway broken, you will get a cross 
product of Orders, so I would remove There is an Order from both rules.


Cheers,
 Jarek

Nagaraju runkana wrote:

HI Guys,

present i am using drools 4.0 in this case.now, i am writting some rules
validation using regular expression ZIPCODE,EMAIL,CREDIT CARD number.like
this..

validation.dslr

rule email.mandatory:[insert][update][ui]
 when
  There is an Order
  Order email address checking for first letter
then
 Reject with response : email address must not start with @ 
end
rule phone.mandatory:[insert][update][ui]
when
 There is an Order
 Order phone number format should checking
 then
 Reject with response : The phone number you entered is not valid.Please
enter a phone number with the format xxx-xxx-.\
end
---
validation.dsl

[*][]Order email address checking for first letter= OrderBean(email matches
@[A-Za-z0-9]*)
[*][]Order phone number format should checking=OrderBean( phone not matches
(/\d{3}\-\d{3}\-\d{4}/)==-1))
this rules are not working ...any one can help me.ASAP

thanks,
chanti





___
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] Using global in LHS

2008-05-30 Thread Jaroslaw Kijanowski

Markus Helbig wrote:

Hi,

also using memberOf results in: Unable to create Field Extractor for
'advertisment' of '[ClassObjectType

do i'll miss sth else?


Yes, I guess so  ;)
Now you are using
is of type Advertisment=advertisment memberOf catId
right?
As I said before the let side of contains, memberOf, etc must be a 
field. catId is a field, advertisment is a global.

To have it fixed try
is of type Advertisment=catId memberOF advertisment

Cheers,
 Jarek




Cheers

Markus

On Thu, May 29, 2008 at 2:48 PM, Jaroslaw Kijanowski
[EMAIL PROTECTED] wrote:

Hi,
 there are two issues:
- the left side of contains needs to be filed of Item (it also needs to be a
Collection or array)
- in your case you should use memberOf to check if a field (catId) is a
member of a Collection or array.

see the docs for more info (6.5.2.1.1.3.1. Operators)

However if you're going to use an array as your global, you will run into a
CCE, because an array doesn't implement the Collection interface [1], [2].
I'm not sure if this is a bug in drools or an expected constraint, hence a
bug in the docs.
Anyway, your safe using a List.

Cheers,
 Jarek

[1]
drools-core/src/main/java/org/drools/base/evaluators/BaseMemberOfEvaluator.java
(evaluate())
[2] drools-core/src/main/java/org/drools/spi/FieldValue.java


Markus Helbig wrote:

Hi,

again a question, any body had success using globals in LHS?

Following DSL

[condition][]is a Item=Item()
[condition][]-is of type Advertisment=advertisment contains catId


rule
when
   $pli: is a Item
   - is of type Advertisment
then
   // do whatever you want
end

catId is a member of Item
advertisment is a Integer[] array set as global

comiling ends with:

Unable to create Field Extractor for 'advertisment' of '[ClassObjectType

It works fine if advertisment is a member of Item, but i want to have
it as global ...

Cheers

Markus
___
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] no-loop and update vs. PropertyChangeListener

2008-05-28 Thread Jaroslaw Kijanowski

Hi,
 I'm running the StateExampleUsingSalience example. It uses a fact with 
PropertyChangeSupport.
AFAIUI I don't have to call update() every time I modify this fact in 
the RHS, when I want to have my rules to be reconsidered.


I've modified the drl to look like this:

rule a
no-loop true
when
b : State(name == B, state == State.NOTRUN )
then
System.out.println(b.getName() +  finished );
b.setState( State.FINISHED );
System.out.println(b.getName() +  finished 2 );
b.setState( State.NOTRUN );
end


When I insert a State object (name=B, state=State.NONE), this rule 
would run forever if no-loop wouldn't be set to true. Unfortunately I'm 
wrong. If I want to have no-loop working I need to provide update() 
after b.setState().


So it looks like PropertyChangeSupport doesn't cancel an activation, 
like update() does.


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


Re: [rules-users] No accumulator function found for identifier

2008-05-21 Thread Jaroslaw Kijanowski
Thanks for the tip! I'm on linux, but putting this file in my home dir 
made it work, too.


Steven Williams wrote:

Hi Jarek,

I have had a similar problem. For the moment I have put the
drools.packagebuilder.conf file in my home directory (e.g. c:\documents and
settings\username on windows). Whilst not ideal it works.

cheers
Steve

On Tue, May 20, 2008 at 10:36 PM, Jaroslaw Kijanowski 
[EMAIL PROTECTED] wrote:


Hi,
 when I create my own accumulate function, I add it to
src/main/java/META-INF/drools.packagebuilder.conf and it works fine.

However, eclipse is showing one error:
No accumulator function found for identifier: ...

I've found this
http://lists.jboss.org/pipermail/rules-users/2007-December/004349.html
and tried to move META-INF to the root dir, but then my app doesn't work
(and eclipse shows the same error).

Any thoughts?

Thanks,
 Jarek
___
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] MissingPackageName Exception | Eclipse | brl to drl

2008-05-21 Thread Jaroslaw Kijanowski

Hi,
 as mentioned in the docs, you could use an ant task. So if you look at 
the sources

drools-ant/src/main/java/org/drools/contrib/DroolsCompilerAntTask.java
you will notice, that it adds the package file explicitly.

In your case, try this:
String rulePackageContent = FileUtils.readFileToString(rule.package);
String brl = FileUtils.readFileToString(file);
String outputDRL = rulePackageContent + write.marshal(read.unmarshal(brl));

HTH,
 Jarek

- Original Message -
Hi,

We created a brl rule using guided editor in Eclipse 3.3
On trying to create a rule package we are getting a 'MissingPackageName'
exception.
As like a brl rule created in BRMS, on eclipse, the DRL source of the
created brl shows only the rule body `with the exception of the package
statement and imports. Our understanding is that packagebuilder in
drools-compiler should pick the package name and the imports defined in the
rules.package text file.

Things work fine for business rules created in guided editor in BRMS. Are we
missing something obvious here? or there isn't a way to compile and test the
brl files created in Eclipse. Any inputs are highly appreciated. Thanks.

Code snippet fyi
File file = new File(test_brl);
BRXMLPersistence read = (BRXMLPersistence)
BRXMLPersistence.getInstance(); 
BRDRLPersistence write =
(BRDRLPersistence)BRDRLPersistence.getInstance();
String brl = FileUtils.readFileToString(file);
String outputDRL = write.marshal(read.unmarshal(brl));
System.out.println(outputDRl+outputDRL);
//Output DRL here doesn't show the import 
statements

and package name

PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl(new 
StringReader(outputDRL

));  //Missing package name for rule package exception occurs here
Package pkg = builder.getPackage();
   RuleBase ruleBase = RuleBaseFactory.newRuleBase();
   ruleBase.addPackage( pkg );

WorkingMemory workingMemory = 
ruleBase.newStatefulSession();
workingMemory.insert(obj);
workingMemory.fireAllRules();
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] No accumulator function found for identifier

2008-05-20 Thread Jaroslaw Kijanowski

Hi,
 when I create my own accumulate function, I add it to 
src/main/java/META-INF/drools.packagebuilder.conf and it works fine.


However, eclipse is showing one error:
No accumulator function found for identifier: ...

I've found this
http://lists.jboss.org/pipermail/rules-users/2007-December/004349.html
and tried to move META-INF to the root dir, but then my app doesn't work 
(and eclipse shows the same error).


Any thoughts?

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