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!
12 years, 10 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.
12 years, 10 months
Difference between Rule Base and Knowledge Base
by Swapnil Sawant
Hi,
I had a very basic doubt. 'Rule Base' and 'Knowledge Base' are two different concepts (may be from implementation point of view )?
I got this doubt when I was going through section '1.4.7.2. Drools execution server' of drools guvnor (v5.0) where it was written like :
The drools execution server (drools-server) module is a war which you can deploy to execute "knowledgebases (rulebases)" remotely for any sort of client application
The thing is that , I have created Knowledge base from changeset.xml as follows :
kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyRuleAgent" );
kagent.applyChangeSet( ResourceFactory.newUrlResource( changesetUrl ) );
kbase = kagent.getKnowledgeBase();
Now if I wish to get Rule Base corresponding to my changeset(or rather my DRL file) using 'this kbase object' , how can I do that ?
Thanks,
Swapnil Sawant
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.
______________________________________________________________________
12 years, 10 months
proxy config for change-set schema fetch?
by Allen, Robert R
Hi All:
I'm running drools expert and guvnor on a single machine that runs
behind an authentication-required HTTP proxy to the outside world. I'm
fetching rulesets from the guvnor URL using the KnowledgeAgent. The
loading of each URL takes a consistent 3 minutes and it appears that the
delay may be from trying to fetch the xml schema which does not succeed
because the request must go to jboss thru a proxy. I get these two
messages in the log file:
(null: 1, 290): schema_reference.4: Failed to read schema document
'http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/sr
c/main/resources/change-set-1.0.0.xsd', because 1) could not find the
document; 2) the document could not be read; 3) the root element of the
document is not <xsd:schema>.
(null: 1, 290): cvc-elt.1: Cannot find the declaration of element
'change-set'.
After the delay, the parsing works correctly and the KnowledgeAgent
creates the KnowledgeBase correctly. Here is an example of the change
set being passed to the KnowledgeAgent:
<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
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src
/main/resources/change-set-1.0.0.xsd' > <add> <resource
source='http://localhost:8080/arcotadmin/org.drools.guvnor.Guvnor/packag
e/pkg1/LATEST.drl' type='DRL' basicAuthentication='enabled'
username='usr1' password='123456' /> </add> </change-set>
Questions:
1. Can I tell KnowledgeAgent to use a local file for the schema
and thereby bypass the external lookup altogether? What would the syntax
for that look like?
2. Is there a way to provide proxy information to KnowledgeAgent
or drools expert as a whole that includes authentication credentials?
Thanks,
-Robert
12 years, 10 months
drools flow - how to crate a human task form?
by gs76pl
hi,
What is the best way of creating some UI for human tasks with an input form?
I've a sample process with a human task that should update some values in
the process. I had a look into API of a task and the only thing i can find
there is 'content' which i'm not really sure about (is it the place where
for instance HTML UI should be created?) Is there any way to create this
form with some additional actions like : claim/fail etc?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-flow-how-to-cr...
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 10 months
ProcessEventListener event order
by Carlos Villegas
Hi,
I'm testing the ProcessEventListener on a simple process and I get the
"after" events in reverse order.
For example,
Process completed : 1283915643204
Node left: 5: 1283915643268
Node triggered: 5: 1283915643268
Node left: 4: 1283915643268
Node triggered: 4: 1283915643269
Node left: 3: 1283915643269
Node triggered: 3: 1283915643270
Node left: 2: 1283915643270
Node triggered: 2: 1283915643270
Node left: 1: 1283915643270
Node triggered: 1: 1283915643271
Node left: 0: 1283915643271
Node triggered: 0: 1283915643271
Process started : 1283915643271
I'm just printing the node id and the time in milliseconds.
Is this the way is supposed to be?
I guess technically "after" could be anytime after, but if I use the
afterProcessStarted event, I get it after the whole process has
completed!, which it's not useful at all.
The "before" events work as expected I think.
I'm using Drools Flow 5.1.0.
Thanks,
Carlos
12 years, 10 months
CPU Spike creating a StatefulKnowledgeSession using OSGi
by David Conde
Good Morning,
I now have drools running on the Spring DM-Server but I am seeing a CPU
spike when creating a StatefulKnowledgeSession. I've tested this outside of
an OSGi environment and I don't see the spike. Does anyone know any settings
that I can change that might make this go away?
Thanks,
Dave
--
David Conde
CTO Calom Technologies
12 years, 10 months
Questions regarding Guvnor
by Harshit Bapna
Hello All,
Few questions:
1. What is the release date of Guvnor 5.2 ? (Couldn't find it from the site
of the documentation)
I am interested in the functionality to add the guvnor editors in
another app for rule editing. i.e. StandaloneEditorServlet
2. Which SVN TAG of the Guvnor (which has standalone editor functionality)
should I use ?
Note: On trunk I have observed that the war contains a folder *guvnor* where
as guvnor 5.1 war contained folder *org.drools.guvnor.Guvnor*
Also the web.xml in the trunk has the following url pattern <url-pattern>/*
org.drools.guvnor.Guvnor*/feed/*</url-pattern>
This url pattern would never be matched as the Guvnor.html is under
guvnor/Guvnor.html. To make it work I had to update the url patterns in the
web.xml
Is there anything that I am doing wrong ? (mvn clean install
-Dmaven.test.failure.ignore=true)
IMO, the trunk has partial changes checked in. Hence it is not stable.
Thanks
12 years, 10 months
KnowledgeAgent and applyChangeSet
by bob.breitling
If I have a KnowledgeAgent and I create a URL Resource and set its
basicAuthenication, username and password attributes then I call the agents
applyChangeSet method I get a HTTPD 401 response from the Guvnor. It does
not happen to my resourse which has a valid username and password, but it
happens to the resource in the changeSet xml tag.
It would seem to me that the resources that are built from the resource I
passed would inherit the basicAuthenication, username and password
attributes that I set and know work, but they don't and I get this error.
If I debug the code and filling in those values on the resource passed to
the createPackageFromResource method before the resource stream is read the
code works.
I am using the NilAuthenicator in the Guvnor components.xml and that seems
to be working. I get access to the Guvnor without being asked for
credentials.
I tried to configure my jboss (4.2.0) in login-config.xml to allow access to
everything as guest. But no luck.
Any suggestions?
Bob
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/KnowledgeAgent-and-ap...
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 11 months