Rules-Flow question
by Carlos De Matos
I am confused as to how to fire off a rules flow (DRL) file.
In a stateless session, how many individual rules-flows are valid, how do we
choose which one to fire or do they all fire?
In a state-full session, I imagine any number of rules-flows would be valid.
Is this correct? How do I choose to fire one rules flow, and what happens
when I execute a fireAllRules? Do all rules-flow also fire, or none of them?
--
Carlos M. De Matos
cmdematos.com
15 years, 4 months
Drools 5.1 and JMX
by Agarwal, Beena
I've enabled JMX using the following configuration
KnowledgeBaseConfiguration kbaseConf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kbaseConf.setOption(MBeansOption.ENABLED);
commonKB = KnowledgeBaseFactory.newKnowledgeBase("kb-"+gameCode, kbaseConf);
commonKB.addKnowledgePackages(kbuilder.getKnowledgePackages());
I see the Mbeans in jconsole. However, don't have any session information. I tried using both stateless and stateful sessions.
>From looking at the source code stateful sessions are automatically registered.
I'm looking for sessions stats for rules such as totalActivationsCreated, totalActivationsFired, etc.
Is there something I need to do to enable that?
Any help would be greatly appreciated
Beena
15 years, 4 months
Rules Flow Eclipse editor
by Prafull Kumar
Hi All,
I would like to know how we can modify the Rules flow eclipse editor look and
feel and functionality. e.g. If we have a Embedded Sub-Process in the flow and
reduce the size of it, the arrows are still displayed in the main canvas. Please
see the attached snapshot for reference.
How we can fix it? also if we want to open the Embedded Sub-Process in a new
window for easy maintainability/readability of the very complex processes, how
we can achieve it?
Going forward we are also looking to create the custom editor for the nodes.
Please guide us if its possible and there is any document for this.
Note: It seems that I can not attach files in the mailing list. Let me know if
its possible to share the image.
Regards, Prafull
15 years, 4 months
compiling performance dropped with 5.0.1 to 5.1.1 upgrade
by Justin Case
Hi all,
my set of rules (100 files, 20 rules/file) was taking 30 seconds to compile
until yesterday. Now I upgraded DRools to 5.1.1 and it takes about 2 minutes to
compile. I'm on Windows XP and cannot notice any memory or CPU bottlenecks.
I'm using an Ant task to do it, and the timing is exactly the same whether I'm
using the DRools Ant compiler task, or I define a compiler task of my own. I can
see in my own compiler task that this particular line is spending a few seconds
per DRL file:
builder.add( res, ResourceType.DRL );
so the effective compilation is the culprit right? I tried also to merge all the
DRL files and compile them all-at-once but this didn't change anything.
Do you have any idea what might have changed between 5.0 and 5.1 or what I could
do to have it like before? Or even faster, of course :)
Thanks a lot,
JC
15 years, 4 months
drools flow 5.2.0.SNAPSHOT
by melc
Hi all,
Has anyone tried from the lastSuccessfulBuild - #6023, the drools flow
part?? i.e. create a process in guvnor and view it from gwt-console or
gwt-console-server or should we not touch that yet?? and play with the 5.1
version of the gwt-console/gwt-console-server??
The log with the exceptions follows and it seems that
org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable is
not found. Tried to place the package containing the variabletypes from
drools-persistence-jpa-5.1.1 into
drools-flow-persistence-jpa-5.2.0.SNAPSHOT.jar of
gwt-console-server-drools.war but no luck, I get another exception and a new
adventure begins....
Any help will be greatly appreciated, thank you!!
2010-11-17 11:32:51,578 INFO [STDOUT] 11:32:51,578 INFO [Environment]
Bytecode provider name : javassist
2010-11-17 11:32:51,578 INFO [STDOUT] 11:32:51,578 INFO [Environment]
using JDK 1.4 java.sql.Timestamp handling
2010-11-17 11:32:51,718 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/gwt-console-server].[Resteasy]]
Servlet.service() for servlet Resteasy threw exception
org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could
not initialize stateful knowledge session: [PersistenceUnit:
org.drools.persistence.jpa] class or package not found
at
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
at
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
at
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
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.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Could not initialize stateful
knowledge session: [PersistenceUnit: org.drools.persistence.jpa] class or
package not found
at
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:102)
at
org.drools.integration.console.DroolsFlowCommandDelegate.getSession(DroolsFlowCommandDelegate.java:110)
at
org.drools.integration.console.DroolsFlowCommandDelegate.<init>(DroolsFlowCommandDelegate.java:53)
at
org.drools.integration.console.DroolsFlowProcessManagement.<init>(DroolsFlowProcessManagement.java:36)
at
org.drools.integration.console.DroolsFlowManagementFactory.createProcessManagement(DroolsFlowManagementFactory.java:27)
at
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
at
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
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.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
... 26 more
Caused by: javax.persistence.PersistenceException: [PersistenceUnit:
org.drools.persistence.jpa] class or package not found
at
org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1089)
at
org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:886)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:772)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:183)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:240)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:63)
... 42 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:
org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:112)
at
org.hibernate.ejb.Ejb3Configuration.classForName(Ejb3Configuration.java:1005)
at
org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1077)
... 50 more
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-flow-5-2-0-SNA...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
Drools Human Task Issue on Server Restart
by ramram
Hi All,
I Have an issue with Human Task in Drools. I have a simple scenario.
Start --> Human Task1 ---> Human Task2 ---> Human Task3 ---> End
I persisted the Task Service as well as the Human Task info to Oracle.
But what is happening is that I have the Human Task1 once completed a Human
Task2 is being created, After that I restart the jboss server (trying to
imitate a power shutdown issue to test if the process will continue) the
human task data are persisted to Oracle but on the restart the server I can
see the task and once I completed it it is changing its status from reserved
to completed but the process stops and Human Task3 is not being created.
Any Ideas? on what is happening.
Is there any recommendation on this issue?
Thanks in advance.
Regards,
Ram
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Human-Task-Iss...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
Drools Spring module
by ahmed fayed
Hi,
Are the new Spring Module support creating POJO Rules? I could't find the
rule, condition, and consequence annotations classes in the new JARs in 5.1,
any idea if it's still supported and in which JAR?
Thanks in advance.
15 years, 4 months
Re: [rules-users] Replacement for eval
by Greg Barton
If you use bean property conventions for naming your methods you can use a regular condition element. for instance, you could rename emptyMessageFinder() to isMessageFound() or getMessageFound() and your condition would look like this:
when
m : Message(messageFound == true)
then
...
end
And when you do this the rete is used, birds sing in the trees, and world peace will be declared.
GreG
On Nov 16, 2010, at 5:37, Nirmal Fernando <nirmal070125(a)gmail.com> wrote:
Hi,
I have two questions.
1) Is there any other way/method in Drools to test the truth value of a condition other than "eval"?
In almost all rules of my application needs to test conditions, and it takes ages to run using "eval".
2) Say I have a java method which returns a boolean, and I have used it within an "eval" function. (eg: eval(message.emptyMessageFinder()) )
This "emptyMessageFinder()" method will return a "boolean" if there's an empty message. This function is containing many loops and recursive operations.
Will I get a performance improvement if I alternate the above such that the "emptyMessageFinder()" method sets a boolean attribute (anyEmptyMessage)
in the Message class to true and false, and I'm using following in my drl.
when
m: Message()
m.emptyMessageFinder()
eval(m.anyEmptyMessage) //can I use eval here??
......
If someone can answer these questions it would be a great help!
Thank you in advance!
--
Best Regards,
Nirmal
C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.
Blog: http://nirmalfdo.blogspot.com/
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 4 months