Not Able to create a cindition BRL fragment
by Aditi Hardas
Hi ,
I am using Drool Guvnor 5.5 along with IE 9 and Tomcat 7.0.32. I have
successfully deployed Guvnor in Tomcat.In next step I have created a package
then add a new category and added a rule with Decision Table (web - guided
rule ) as a rule formate.I was able to create a rule with certain set of
conditions and actions.On clicking Include Advance Option and choose *Add a
condition BRL fragment* or *Add an action BRL fragment*, I am getting java
script error and nothing is moving forword after that. That mean I am not
able to add and BRL fragment to my rule.
Can any one help me for this. Does I am doing any thing wrong.
Thx in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Not-Able-to-create-a-cindition-BRL-frag...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Guvnor + Oracle 10g
by abhinay_agarwal
hi ,
I was trying to connect my guvnor to oracle 10g database, but somehow i get
the following error when i try to redploy guvnor after pasting the
repository.xml.
Any idea what this can be ?
SEVERE: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public
abstract org.drools.guvnor.client.rpc.Module[]
org.drools.guvnor.client.rpc.ModuleService.listModules()' threw an
unexpected exception: org.jboss.weld.exceptions.WeldException: WELD-000049
Unable to invoke [method] @PostConstruct public
org.drools.guvnor.server.repository.RepositoryStartupService.create() on
org.drools.guvnor.server.repository.ProductionRepositoryStartupService@dddff
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to
invoke [method] @PostConstruct public
org.drools.guvnor.server.repository.RepositoryStartupService.create() on
org.drools.guvnor.server.repository.ProductionRepositoryStartupService@dddff
at
org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:400)
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:174)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:294)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
at
org.drools.guvnor.server.repository.ProductionRepositoryStartupService$Proxy$_$$_WeldClientProxy.newSession(ProductionRepositoryStartupService$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.repository.RulesRepositoryManager.getRulesRepository(RulesRepositoryManager.java:78)
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:597)
at
org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at
org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
at
org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
at
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:137)
at
org.jboss.weld.bean.ProducerMethod$ProducerMethodProducer.produce(ProducerMethod.java:136)
at
org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:319)
at
org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
at
org.drools.repository.RulesRepository$Proxy$_$$_WeldClientProxy.listModules(RulesRepository$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.RepositoryModuleOperations.listModules(RepositoryModuleOperations.java:102)
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:597)
at
org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:44)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
at
org.drools.guvnor.server.RepositoryModuleOperations$Proxy$_$$_WeldClientProxy.listModules(RepositoryModuleOperations$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.RepositoryModuleService.listModules(RepositoryModuleService.java:109)
at
org.drools.guvnor.server.RepositoryModuleService.listModules(RepositoryModuleService.java:102)
at
org.drools.guvnor.server.RepositoryModuleService$Proxy$_$$_WeldClientProxy.listModules(RepositoryModuleService$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.ModuleServiceServlet.listModules(ModuleServiceServlet.java:26)
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:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
... 17 more
Caused by: java.lang.reflect.InvocationTargetException
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:597)
at
org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at
org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
at
org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:174)
at
org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:398)
... 58 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at
oracle.jdbc.driver.PhysicalConnection.getByteBuffer(PhysicalConnection.java:6991)
at
oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:895)
at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:261)
at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:127)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:992)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
at
oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3488)
at
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at
org.apache.jackrabbit.core.util.db.ConnectionHelper.execute(ConnectionHelper.java:438)
at
org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyExec(ConnectionHelper.java:359)
at
org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelper.java:339)
at
org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelper.java:335)
at
org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:458)
at
org.apache.jackrabbit.core.util.db.ConnectionHelper.exec(ConnectionHelper.java:335)
at
org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.loadBundle(BundleDbPersistenceManager.java:1020)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.getBundle(AbstractBundlePersistenceManager.java:654)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.exists(AbstractBundlePersistenceManager.java:473)
at
org.apache.jackrabbit.core.version.InternalVersionManagerImpl.<init>(InternalVersionManagerImpl.java:159)
at
org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:509)
at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:329)
at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
at
org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
at
org.drools.repository.JCRRepositoryConfigurator.login(JCRRepositoryConfigurator.java:95)
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-Oracle-10g-tp4022991.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Guvnor REST APIs - what rule features are supported?
by kurrent93
Hi
I saw a thread a few days ago asking about how to enable/disable rules using
the guvnor REST Api - only to find that that functionality does not exist.
What other functionalities are not covered by the REST apis?
For example, can we add calendars using the REST api?
What about salience, no-loop, activation group, agenda group, duration?
We are looking to build a custom UI for editing rules, using the Guvnor REST
apis, and but if there is limited coverage, then we will need to find an
alternative.
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-REST-APIs-what-rule-features-are...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
drl for Selection and Decreasing
by Al Ferguson
Hi,
I'd like to use the Planner to determine the location of items to be shipped
(aka Order Sourcing).
The Planning Entity is:
.---------------------.
| OrderLine |
| ------------------- |
| String productCode |
| int orderedQuantity |
| StockItem stockItem |
'---------------------'
The resource (Planning Variable) is:
.-----------------------.
| StockItem |
| --------------------- |
| String productCode |
| String warehouseId |
| int availableQuantity |
'-----------------------'
Solution Implementation is:
.-----------------.
| OrderPlanning |
| --------------- |
| score |
| orderLineList |
| stockItemList |
'-----------------'
Here's an example to be solved:
OrderLine [id=1, productCode=A, orderedQuantity=1]
OrderLine [id=2, productCode=B, orderedQuantity=2]
OrderLine [id=3, productCode=B, orderedQuantity=2]
StockItem [id=1, productCode=A, warehouseId=NYC, availableQuantity=1000]
StockItem [id=1, productCode=B, warehouseId=NYC, availableQuantity=1000]
StockItem [id=1, productCode=B, warehouseId=CHI, availableQuantity=1000]
Can you help me writing the required 'drl'?
- StockItem.productCode must be the OrderLine.productCode
- StockItem.availableQuantity must be decreased when an OrderLine is
allocated
Obviously the allocation rules are much more complex. But I'm starting with
the Planner and I need help to start.
Thanks,
Al
--
View this message in context: http://drools.46999.n3.nabble.com/drl-for-Selection-and-Decreasing-tp4022...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Issue with Rule X1 extends X2
by arul.prashanth@gmail.com
When two rules recide within a same drl extends works as expected.
rule "Base_Rule|1.1.2"
enabled false
when
$bdy : BDY()
Vehicles()
then
System.out.println(" >>>> 222 "+$bdy);
end
rule "TX_Rule|1.1.2" extends "Base_Rule|1.1.2"
when
then
System.out.println(" >>>> TX 222 "+$bdy);
end
When the super rule recides in a different DRL and child rule in a different
DRL the parent rule is not fired
rule "TX_Rule|1.1.1" extends "Base_Rule|1.1.0"
when
BDY();
then
System.out.println(" >>>> TX 111 "+$bdy);
end
Any thoughts ??
--
View this message in context: http://drools.46999.n3.nabble.com/Issue-with-Rule-X1-extends-X2-tp4023114...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months
Drools JPA Example
by Charles Moulliard
Hi,
I'm looking for a Drools JPA example. As the Drools Community Project does
not contain such example I contact the community to figure out if such
example exist and is available in a git repo
Regards,
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
12 years, 11 months
Working memory - database synchronisation approach
by riri
Hello everyone,
I am currently working on a Spring, Hibernate, Bitronix project and am
trying to integrate Drools functionality. I have a set of JPA Entities that
I can manage using Spring Data and Hibernate and I would like to use these
entities as facts inside a StatefulKnowledgeSession. As I understand it, I
need to have some mechanism of keeping the facts inside the working memory
in sync with the database and what I mean by that is:
1. update the facts in working memory when they are changed from outside
2. update the facts in the database when a RHS part of a rule changes
properties
This article http://www.ibm.com/developerworks/java/library/j-drools5/
<http://www.ibm.com/developerworks/java/library/j-drools5/> gives some
pointers on how to achieve 1. using AOP but in my case I do not have a
global knowledge session to insert, I need to be able to create a knowledge
base for each user of the application since each user will need to have his
own set of rules independent from other users.
What would be the best practices for achieving the synchronisation?
Currently for 1. I am updating the fact manually by retrieving the object
and calling update from java code. For 2. I have a
WorkingMemoryEventListener that is configured as a Spring @Component with
autowired services that can perform CRUD actions on entities and which are
called on objectUpdated.
I am new to all these technologies so I do not know if this is a good way to
go. I have a unit test where a rule modifies a property and the object is
updated in the database but if the Thread with the fireUntilHalt method is
not paused, the test finishes and the JTA manager is shut down before the
rules can fire and the transaction in the objectUpdated can be executed.
I would be very grateful for any insight from the more experienced users
that have come across such requirements before.
Best regards
--
View this message in context: http://drools.46999.n3.nabble.com/Working-memory-database-synchronisation...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 11 months