drools in a SOA environment
by Dieter D'haeyere
I have some questions regarding the overall view of what is happening where
when using Drools in a service oriented environment.
This is the idea:
Some applications are making use of rules for some calculations. The idea
is to be able to call the rule engine as a service. Meaning: passing all
facts to the rule base and based on that, rules will be fired and the facts
will be updated. Rules will be called a lot so scalability is important.
Next to that: the conclusion part should be able to call other services, eg.
to do some calculations. An ESB is available so communication could go over
that bus.
Now: this is how I see it:
Drools Guvnor is the place where the rules are stored and managed. (war)
Drools Server is where the actual calculations take place. (war but... when
more load must be handled, multiple instance could be deployed).
The application does a SOAP call to Drools Server (passes facts and
commandos) and all is ok...
Well .. now the problem starts... I don't get it :)
I mean: how does Drools Server talk to the rule base ? I haven't found a
clear article (but probably it does exist, just didn't find it yet) where
this cooperation is demonstrated.
Also: I read about Camel / Spring / Rest which would be the new way to call
a service... So SOAP is no longer supported (or will be deprecated as of
Drools v5.x ?)
An overview and / or some best practices on how to design the architecture
would be welcome.
Btw, as I understand it now, Drools - grid will be the way to go. But that
will probably will be for version > 5.2.
And then again, I am confused about the split between the rule 'engine' (I
have been told that there is not such a thing as a big calculating engine)
and the rule repository.
I kind of would expect that those two could be coupled tightly together (ok,
there is probably a good reason why choices are made as they are, I am way
too newbie to interfere in any such discussion).
Sincerely,
Dieter D'haeyere.
15 years, 7 months
GWT Console - Drools Flow problems.
by tom ska
>
> Hello,
> I am trying to use Drools Flow with GWT Console v.2.1. I use Guvnor and
> Eclipse too. I am new in server applications, and jBoss is for me something
> new, so please be patient :)
> What I did are:
>
1.)Creating processes in Eclipse. They work.
2.)Exporting them to Guvnor - I can see them, everything is OK.
Then I try to start GWT-Console. When I log in, I get this:
- URL: 'http://localhost:8080/gwt-console-server/rs/tasks/admin'
- Action: 'org.jboss.bpm.console.client.task.LoadTasksAction'
- Exception: 'class com.google.gwt.http.client.RequestException'
HTTP 500:
HTTP Status 500 -
------------------------------
*type* Exception report
*message*
*description* *The server encountered an internal error () that prevented it
from fulfilling this request.*
*exception*
org.jboss.resteasy.spi.UnhandledException:
java.lang.IllegalArgumentException: Could not connect task client
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*root cause*
java.lang.IllegalArgumentException: Could not connect task client
org.drools.integration.console.DroolsFlowTaskManagement.connect(DroolsFlowTaskManagement.java:43)
org.drools.integration.console.DroolsFlowTaskManagement.getAssignedTasks(DroolsFlowTaskManagement.java:112)
org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:99)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*note* *The full stack trace of the root cause is available in the JBoss
Web/2.*
When I click on Process Overwiev, I get:
- URL: 'http://localhost:8080/gwt-console-server/rs/process/definitions'
- Action: 'org.jboss.bpm.console.client.process.UpdateDefinitionsAction'
- Exception: 'class com.google.gwt.http.client.RequestException'
HTTP 500:
HTTP Status 500 -
------------------------------
*type* Exception report
*message*
*description* *The server encountered an internal error () that prevented it
from fulfilling this request.*
*exception*
org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException:
Could not initialize stateful knowledge session: Could not commit
session or rollback
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*root cause*
java.lang.RuntimeException: Could not initialize stateful knowledge
session: Could not commit session or rollback
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:86)
org.drools.integration.console.DroolsFlowCommandDelegate.getSession(DroolsFlowCommandDelegate.java:94)
org.drools.integration.console.DroolsFlowCommandDelegate.<init>(DroolsFlowCommandDelegate.java:37)
org.drools.integration.console.DroolsFlowProcessManagement.<init>(DroolsFlowProcessManagement.java:20)
org.drools.integration.console.DroolsFlowManagementFactory.createProcessManagement(DroolsFlowManagementFactory.java:11)
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*root cause*
java.lang.RuntimeException: Could not commit session or rollback
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:289)
org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.registerWorkItemHandler(CommandBasedStatefulKnowledgeSession.java:144)
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:80)
org.drools.integration.console.DroolsFlowCommandDelegate.getSession(DroolsFlowCommandDelegate.java:94)
org.drools.integration.console.DroolsFlowCommandDelegate.<init>(DroolsFlowCommandDelegate.java:37)
org.drools.integration.console.DroolsFlowProcessManagement.<init>(DroolsFlowProcessManagement.java:20)
org.drools.integration.console.DroolsFlowManagementFactory.createProcessManagement(DroolsFlowManagementFactory.java:11)
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*root cause*
java.lang.RuntimeException: Unable to rollback transaction
org.drools.persistence.session.JtaTransactionManager.rollback(JtaTransactionManager.java:181)
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:287)
org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.registerWorkItemHandler(CommandBasedStatefulKnowledgeSession.java:144)
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:80)
org.drools.integration.console.DroolsFlowCommandDelegate.getSession(DroolsFlowCommandDelegate.java:94)
org.drools.integration.console.DroolsFlowCommandDelegate.<init>(DroolsFlowCommandDelegate.java:37)
org.drools.integration.console.DroolsFlowProcessManagement.<init>(DroolsFlowProcessManagement.java:20)
org.drools.integration.console.DroolsFlowManagementFactory.createProcessManagement(DroolsFlowManagementFactory.java:11)
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
*root cause*
java.lang.IllegalStateException: BaseTransaction.rollback -
[com.arjuna.ats.internal.jta.transaction.arjunacore.notx]
[com.arjuna.ats.internal.jta.transaction.arjunacore.notx] no
transaction!
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:160)
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114)
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.rollback(ServerVMClientUserTransaction.java:170)
org.drools.persistence.session.JtaTransactionManager.rollback(JtaTransactionManager.java:178)
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:287)
org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.registerWorkItemHandler(CommandBasedStatefulKnowledgeSession.java:144)
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:80)
org.drools.integration.console.DroolsFlowCommandDelegate.getSession(DroolsFlowCommandDelegate.java:94)
org.drools.integration.console.DroolsFlowCommandDelegate.<init>(DroolsFlowCommandDelegate.java:37)
org.drools.integration.console.DroolsFlowProcessManagement.<init>(DroolsFlowProcessManagement.java:20)
org.drools.integration.console.DroolsFlowManagementFactory.createProcessManagement(DroolsFlowManagementFactory.java:11)
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWT
ProcessEnginePlugin is marked with this:
I don't know what to do. I read similar thread to this one, but with no
results for me...
Ramran wrote there:
"The gwt-server-console.jar contains 2 javaassit jar files. I have
deleted both these jars and used only 1 javassist.jar file in the JBOSS lib
folder. Try it "
But I was looking for javaassit.jar in gwt-server-console.jar, but I don't
have gwt-server-console.jar file in my jBoss... I have only
"gwt-console-server-
integration-2.1.jar".
I want to show you my jBoss logs while starting this server:
09:26:24,129 INFO [TomcatDeployment] deploy, ctxPath=/admin-console
09:26:24,176 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for
context '/admin-console'
09:26:27,109 INFO [TomcatDeployment] deploy, ctxPath=/
09:26:27,171 INFO [TomcatDeployment] deploy, ctxPath=/drools-guvnor
09:26:38,279 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J
bindings.
09:26:38,294 ERROR [STDERR] SLF4J: Found binding in [vfszip:/C:/
jboss-5.1.0.GA/server/default/deploy/drools-guvnor.war/WEB-INF/lib/slf4j-log4j12-1.6.0.jar/org/slf4j/impl/StaticLoggerBinder.class<http://jboss-5.1.0.ga/server/default/deploy/drools-guvnor.war/WEB-INF/lib...>
]
09:26:38,294 ERROR [STDERR] SLF4J: Found binding in [vfszip:/C:/
jboss-5.1.0.GA/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class<http://jboss-5.1.0.ga/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/S...>
]
09:26:38,294 ERROR [STDERR] SLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
09:26:44,721 INFO [STDOUT] INFO 27-07 09:26:44,706
(LoggingHelper.java:info:51) Starting mailbox service
09:26:44,721 INFO [STDOUT] INFO 27-07 09:26:44,721
(LoggingHelper.java:info:51) Waking up
09:26:44,737 INFO [STDOUT] INFO 27-07 09:26:44,721
(LoggingHelper.java:info:51) Processing outgoing messages
09:26:44,784 INFO [STDOUT] DEBUG 27-07 09:26:44,784
(LoggingHelper.java:debug:65) Outgoing messages size 0
09:26:44,815 INFO [TomcatDeployment] deploy, ctxPath=/gwt-console
09:26:44,831 INFO [STDOUT] DEBUG 27-07 09:26:44,831
(LoggingHelper.java:debug:65) Processing any inbound messages for
mailman
09:26:44,831 INFO [STDOUT] DEBUG 27-07 09:26:44,831
(LoggingHelper.java:debug:65) Processing any inbound messages for admin
09:26:44,877 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J
bindings.
09:26:44,877 ERROR [STDERR] SLF4J: Found binding in [vfszip:/C:/
jboss-5.1.0.GA/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class<http://jboss-5.1.0.ga/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/S...>
]
09:26:44,877 ERROR [STDERR] SLF4J: Found binding in [vfszip:/C:/
jboss-5.1.0.GA/server/default/deploy/gwt-console-drools-5.1.0.CR1.war/WEB-INF/lib/slf4j-log4j12-1.6.0.jar/org/slf4j/impl/StaticLoggerBinder.class<http://jboss-5.1.0.ga/server/default/deploy/gwt-console-drools-5.1.0.CR1....>
]
09:26:44,877 ERROR [STDERR] SLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
09:26:45,938 ERROR [STDERR] log4j:ERROR A
"org.jboss.logging.appender.FileAppender" object is not assignable to a
"org.apache.log4j.Appender" variable.
09:26:45,938 ERROR [STDERR] log4j:ERROR The class
"org.apache.log4j.Appender" was loaded by
09:26:45,938 ERROR [STDERR] log4j:ERROR [BaseClassLoader@44ee06be
{vfsfile:/C:/
jboss-5.1.0.GA/server/default/deploy/gwt-console-drools-5.1.0.CR1.war/<http://jboss-5.1.0.ga/server/default/deploy/gwt-console-drools-5.1.0.CR1....>}]
whereas object of type
09:26:45,938 ERROR [STDERR] log4j:ERROR
"org.jboss.logging.appender.FileAppender" was loaded by
[org.jboss.bootstrap.NoAnnotationURLClassLoader@4ce86da0].
09:26:45,938 ERROR [STDERR] log4j:ERROR Could not instantiate appender named
"FILE".
.
.
.
09:26:51,445 ERROR [SchemaUpdate] could not get database metadata
org.jboss.util.NestedSQLException: Unable to get managed connection for
jdbc/testDS1; - nested throwable: (javax.resource.ResourceException: Unable
to get managed connection for jdbc/testDS1)
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
.
.
.
09:26:51,445 ERROR [SchemaUpdate] could not complete schema update
org.jboss.util.NestedSQLException: Unable to get managed connection for
jdbc/testDS1; - nested throwable: (javax.resource.ResourceException: Unable
to get managed connection for jdbc/testDS1)
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
.
.
.
09:26:52,053 ERROR [STDERR] log4j:ERROR A
"org.jboss.logging.appender.FileAppender" object is not assignable to a
"org.apache.log4j.Appender" variable.
09:26:52,053 ERROR [STDERR] log4j:ERROR The class
"org.apache.log4j.Appender" was loaded by
09:26:52,053 ERROR [STDERR] log4j:ERROR [BaseClassLoader@34fe7e0e
{vfsfile:/C:/
jboss-5.1.0.GA/server/default/deploy/gwt-console-server-drools-5.1.0.CR1.war/<http://jboss-5.1.0.ga/server/default/deploy/gwt-console-server-drools-5.1...>}]
whereas object of type
09:26:52,053 ERROR [STDERR] log4j:ERROR
"org.jboss.logging.appender.FileAppender" was loaded by
[org.jboss.bootstrap.NoAnnotationURLClassLoader@4ce86da0].
09:26:52,053 ERROR [STDERR] log4j:ERROR Could not instantiate appender named
"FILE".
Thanks for any advise,
tom.
15 years, 7 months
Drools BPMN 2.0 service task error for process edited using Oryx
by Patricia Bogoevici
Hi all,
I am using Drools 5.1 release, and I am testing the BPMN process definition created with Oryx designer. The main problem I ran into is the serviceTask element. I cannot open the process file created with Oryx designer, in Eclipse, as it complains about this error:
"java.lang.IllegalArgumentException: No interfaces found at org.drools.bpmn2.legacy.beta1.ServiceTaskHandler.handleNode(ServiceTaskHandler.java:35)"
Below is a snippet from the BPMN 2.0 xml file got using Oryx for serviceTask. I also attached the whole xml file, in case that help.
I appreciate a lot if someone can help me with this issue, as I am practically stuck at this point.
On the other hand, I noticed that Drools Eclipse workflow editor allows only for 2 types of service tasks: Email and Log. Is that a limitation of the Eclipse workflow editor, or the serviceTask is not implemented in Drools BPMN 2.0?
Can I use serviceTask BPMN 2.0 element in Drools workflow?
****** serviceTask from Oryx process ******
<serviceTask implementation="webService" completionQuantity="1" startQuantity="1" isForCompensation="false" name="AH Web Service" id="oryx_B84C15D7-ADA6-4956-8C43-3DFD02967BE1"/>
Thanks in advance,
Patricia
15 years, 7 months
Matching items based on values in lists
by cortlander
I am new to drools and have been struggling with this rule.
$subject: RqTargetType contains a list of RqAttrib objects
$resource: RqTargetType also contains its own list of RqAttrib objects
$subject in a certain role has to be selected based on (attribType ==
"subject", designator == "subject.role", attribValue == "patient")
$subjectId is to be extracted from another attribute (attribType ==
"subject", designator == "subject.id", $subjectId: attribValue)
We then need to select a resource that has an attribute to match this
$subjectId (attribType == "resource", designator == "resource.patient",
attribValue == $subjectId )
Here is the rule I wrote:
rule "Patient Access Rule"
#conditions
RqTargetType( $subjectAttribs : rqAttribs )
RqAttrib (attribType == "subject", designator == "subject.role",
attribValue == "patient") from $subjectAttribs
RqAttrib (attribType == "subject", designator == "subject.id",
$subjectId: attribValue) from $subjectAttribs
$resource: RqTargetType( )
RqAttrib (attribType == "resource", designator == "resource.patient",
attribValue == $subjectId ) from $resource.getRqAttribs()
RqAttribute (attribType == "resource", designator == "resource.id",
$resourceId: attribValue ) from $resource.getRqAttribs
then
#actions
System.out.println( "resource: " + $resourceId );
System.out.println( "subject: " + $subjectId );
System.out.println( "Patient Access rule decision: Permit" );
decisions.add("Permit");
retract($subject);
end
I keep on getting "no viable alternative at input" error.
Tried stripping the code so that only the following was left and still got
the error:
RqTargetType( $subjectAttribs : rqAttribs )
RqAttrib (attribType == "subject", designator == "subject.role",
attribValue == "patient") from $subjectAttribs
[ERR 101] Line 25:2 no viable alternative at input 'RqTargetType' in rule
"Patient Access Rule"
Then tried this with similar results.
$subject: RqTargetType()
$subjectAttrib: RqAttrib (attribType == "subject", designator ==
"subject.role",
attribValue == "patient") from $subject.getRqAttribs()
no viable alternative at input '$subject' in rule "Patient Access Rule"
Any help will be much appreciated.
Thank you and have a great day.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Matching-items-based-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 7 months
Drools Rule language resources Reg;
by Murali Venugopal
Hi,
I'm a newbie to Drools and Rules. I see this Mailing list provides lot
of valuable information regarding Drools.
Actually I'm looking for some good resources which helps in writing
Rules. I.e Rule Syntax and Semantics. It's since 3 months I have started
showing interest in Drools. But still I can't proceed more than the
examples given in the books, which is not sufficient to work on real
time projects.
I'm referring books like
1. Drools JBoss Rules 5.0
2. JBoss Drools Business Rules
also,
1. Drools documentation and Manuals.
But still there's no definitive guides for writing rules. The Drools
Documentation has listed all the possible keywords. But, their Syntax
and Semantics are missing.
I went through this entire Mailing List hoping someone would have asked
this question before me. But in vain.
So, please refer/point me some good resources for Rules. Because in
Drools, I believe, everything is possible only through Rules.
Thanks and Regards,
Get your world in your inbox!
Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id!
Log on to http://www.sify.com
********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin(a)sifycorp.com
15 years, 7 months
Re: [rules-users] functions inside fact type declaration?
by Greg Barton
+1 on the full constructor.
GreG
On Aug 9, 2010, at 3:58 PM, Edson Tirelli <tirelli(a)post.com> wrote:
I thought about adding that, but I feel like we would just be reimplementing java, in this case. So, if you need anything else other than simple java beans, you should implement it as a java class.
Regarding the constructor, I might still add a constructor that receives all fields as parameters, just to reduce verbosity when using the java dialect, but if you are using mvel dialect, you can use "with":
rule ...
when ...
then
with( person = new Person() ) {
name = "Bob",
age = 35
}
insert( person );
end
Edson
2010/8/9 Tina Vießmann <tviessmann(a)stud.hs-bremen.de>
Hi,
is it possible to define a function/constructor inside a fact type
declaration? If yes, how can it be done?
Thank you :)
Tina
_______________________________________________
rules-users mailing list
rules-users(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 7 months
Meaning of the metadata 'key'
by Tina Vießmann
Hi,
I think I'm to stupid to google, but I can't find an explanation what
'@key' means.
Can anyone please explain it to me or just give me a link?
Sorry for the simple and stupid request and thank you for your help!
Greetings
Tina
15 years, 7 months