Doubt over Agenda-Group
by swaroop
Hi,
Iam invoking a template from a rule using agenda-group setfocus. My doubt is
,after focusing and executing the template based on the agenda-group where
will the rule control fall back to.
Eg:
Rule 1
ruleflow-group "RF1"
WHEN
c : someFact(someCond)
THEN
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("AG1").setFocus();
Do something1
Do Something2 based on some actions set in template invoked through
agenda-group
END
Rule 2
ruleflow-group "RF1"
WHEN
c : someFact(someCond1-->someCond1 is based on the parameters set in
template called in prev rule)
THEN
Do Something3
END
What should be the flow of events after rule 1 execution ?
Thanks
Swaroop
--
View this message in context: http://drools.46999.n3.nabble.com/Doubt-over-Agenda-Group-tp3712866p37128...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months
Contributing to Drools?
by Stephen Masters
Hi folks,
As with Mark's response on OSGI this morning, there have been a number of answers to questions on this list that mention that components are either not currently being worked on, or which request that users contribute new features or patches.
It tends not to be that easy to get to grips with a large open source project, so recently the London Java Community organised an OpenJDK hack session (http://www.meetup.com/Londonjavacommunity/events/49243872/) where they were helping people to build the projects and working on some 'low-hanging-fruit' issues. And apparently the session produced around 20 patches, which seems pretty impressive to me given that it was just a 3-hour evening session.
There seems to be a reasonable number of Drools developers and users in or near London, although I'm not sure about other locations. So I was wondering how feasible it might be to organise something similar around Drools. Obviously it would need a combination of some core developers prepared to spend some of their time helping folks such as myself get to grips with building and testing things, and enough developers interested in spending their spare time learning their way around the internals of the various Drools components. The London JBoss User Group set up a JBoss AS7 hackathon last year, so perhaps there might be someone there who would be prepared to help out?
Any thoughts?
Steve
14 years, 4 months
Doubt over Agenda-Group
by swaroop
Hi,
Iam invoking a template from a rule using agenda-group setfocus. My doubt is
,after focusing and executing the template based on the agenda-group where
will the rule control fall back to.
Eg:
Rule 1
ruleflow-group "RF1"
WHEN
c : someFact(someCond)
THEN
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("AG1").setFocus();
Do something1
Do Something2 based on some actions set in template invoked through
agenda-group
END
Rule 2
ruleflow-group "RF1"
WHEN
c : someFact(someCond1-->someCond1 is based on the parameters set in
template called in prev rule)
THEN
Do Something3
END
What should be the flow of events after rule 1 execution ?
Thanks
Swaroop
--
View this message in context: http://drools.46999.n3.nabble.com/Doubt-over-Agenda-Group-tp3712867p37128...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months
how to retract all documents created in the following scenario
by vadlam
Hi All,
we have a scenario whereby, several documents are created as part of the
ruleflow. at the end of the ruleflow, if any of the fields in the document
is empty or null, we would like to create a error (only one error) and
retract all the documents so far.
rule "createError"
ruleflow-group "mrHardErrors"
no-loop true
dialect "mvel"
when
emptyDoc : Document( field1== null || == ( "" ) , field2 == null || == ( ""
) )
doc : Document( )
then
Error fact0 = new Error();
fact0.setErrorCode( "code1" );
insert(fact0 );
retract( emptyDoc);
end
I see that error is created more than once ( as many as matching documents )
How do we ensure that all documents are retracted and also the error is
created only once ?
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-retract-all-documents-created-in...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months
Camel-drools example
by Serge Vilvovsky
Can anybody provide, please, the example of using camel with drools? Where
should I place the drool files if I run them in ServiceMix?
Thank you!
14 years, 4 months
Accumulate function, events and stream processing
by Juanker Atina
I need your help to put to work an accumulate function.
So, i will introduce several facts into working memory (StateEvent, which i
declare as event) and i want to accumulate the last five values.
I have changed a property in drools.default.rulebase.conf
(drools.eventProcessingMode = STREAM) to make the engine works in stream
mode.
And my rule is:
declare StateEvent
@role( event )
end
rule "Testing"
when
$total : Number() from accumulate(
StateEvent(itemName=="Temperatura", $val : newState) over
window:length( 5 ),
sum ( ((DecimalType)$val).toBigDecimal().doubleValue() ) )
then
#actions
end
But it's not working, as the value of $total is 0.0, no matter what i do,
and the rule is firing with every fact in the working memory.
Any help will be appreciated.
Thanks
14 years, 4 months
ruleflow and bpmn files issues with drools and guvnor 5.2 final
by style.x7
Hi all,
I've tried drools 5.2 final version with much excitement but the default
create new drools project is already giving problems:
Issue 1. Exceptions when running default created .rf and .bpmn files.
When I ran ProcessTest.java with .rf file, I get:
java.lang.NullPointerException
at
org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:516)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:556)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:36)
at com.sample.ProcessTest.main(ProcessTest.java:23)
When I ran ProcessTest.java with .bpmn file, I get:
lang.IllegalArgumentException: Unable to instantiate service for Class
'org.drools.compiler.BPMN2ProcessProvider'
at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:161)
at
org.drools.compiler.BPMN2ProcessFactory.loadProvider(BPMN2ProcessFactory.java:29)
at
org.drools.compiler.BPMN2ProcessFactory.getBPMN2ProcessProvider(BPMN2ProcessFactory.java:21)
at
org.drools.compiler.BPMN2ProcessFactory.configurePackageBuilder(BPMN2ProcessFactory.java:12)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:559)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:33)
at com.sample.ProcessTest.main(ProcessTest.java:20)
Caused by: java.lang.IllegalArgumentException: Unable to instantiate
'org.jbpm.bpmn2.BPMN2ProcessProviderImpl'
at
org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:210)
at
org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:202)
at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:159)
... 7 more
Caused by: java.lang.ClassNotFoundException:
org.jbpm.bpmn2.BPMN2ProcessProviderImpl
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:207)
... 9 more
Issue 2: Guvnor 5.2 final unable to display .rf and .bpmn files
No error message was given when guvnor is unable to display .rf files. The
popup shows blank diagrams.
For .bpmn files, guvnor with designer-1.0.0.052-jboss.war shows the oryx
editor with blank diagrams, error message:
SEVERE [JbpmProfileImpl] Could not find BPMNDI information
java.lang.IllegalArgumentException: Could not find BPMNDI information
at
com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshallProcess(Bpmn2JsonMarshaller.java:347)
at
com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshallDefinitions(Bpmn2JsonMarshaller.java:255)
at
com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshall(Bpmn2JsonMarshaller.java:138)
at
com.intalio.web.profile.impl.JbpmProfileImpl$2.parseModel(JbpmProfileImpl.java:197)
at
com.intalio.web.repository.impl.UUIDBasedJbpmRepository.load(UUIDBasedJbpmRepository.java:38)
at
com.intalio.web.server.UUIDBasedRepositoryServlet.doGet(UUIDBasedRepositoryServlet.java:123)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.intalio.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:75)
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:235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
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:158)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
My development environment is eclipse 3.6, drools plugin 5.2 final, java 6,
windows 7, jboss as 5.1 jdk 6.
Any help would be greatly appreciated.
--
View this message in context: http://drools.46999.n3.nabble.com/ruleflow-and-bpmn-files-issues-with-dro...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months