Unable to locate a login configuration
by Klaus Teller
Hi,
Please I need your help on this one. I keep getting the following exception on Tomcat (both 6 and 7) when running Guvnor. I can deploy it without problem, but when I hit the URL (http://localhost:8080/drools-guvnor/) the error message is printed on the Tomcat console and a 500 error message (
500 The call failed on the server; see server log for details) is displayed in the browser.
What am I missing in the installation process?
Thanks,
Klaus.
ERROR 10-11 05:02:53,771 (LoggingHelper.java:error:76) Service method 'public
abstract org.drools.guvnor.client.rpc.UserSecurityContext org.drools.guvnor.clie
nt.rpc.SecurityService.getCurrentUser()' threw an unexpected exception: java.lan
g.SecurityException: Unable to locate a login configuration
java.lang.SecurityException: Unable to locate a login configuration
at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
--
GRATIS! Movie-FLAT mit über 300 Videos.
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
14 years
Re: [rules-users] rules-users Digest, Vol 48, Issue 36
by Dennis Duggan
Thankyou! This was extremely helpful and solved the issue. The manual has very limited information on this. I needed to go through the examples to find it. Also limited information on queries.
Thanks again for your help!
Dennis
14 years
Re: [rules-users] Query query...
by Dennis Duggan
I have a super interface, that both objects implement.
The matching rule looks like:
rule "Match"
when
$oRecord1 : MyObject1( )
$oRecord2 : MyObject2(RefID==$oRecord1. RefID )
then
$oRecord1.setStatus( "Matched" );
$oRecord2.setStatus( "Matched" );
end
I can breakpoint right after running the query and I see objects with all statuses so the matching rule is firing correctly.
Thanks!
Dennis
Dennis Duggan
Principal Software Engineer, Software Engineering
ESP Technologies Corp. "THE Buy-Side Solution"
One Indian Head Plaza Suite 701, Nashua, NH 03060
603.324.2444 ext. 1304 Office | 603.324.2447 Fax
dennis(a)esptechnologies.com
ESP Technologies, winner 2009 Red Herring North America 100 and 2008 Deloitte Technology Fast 500.
This e-mail and/or attachments may contain privileged, confidential or proprietary information. Unintended recipients should notify the sender immediately and delete. Disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. Brokerage services provided by Electronic Securities Processing (ESP) LLC. Member FINRA, SIPC. This is neither an offer or recommendation to buy or sell any security or other financial instrument. Email compliance(a)esptechnologies.com with questions regarding this disclosure.
From: Dennis Duggan
Sent: Tuesday, November 09, 2010 1:55 PM
To: 'rules-users(a)lists.jboss.org'
Subject: Query query...
I have 2 types of objects in my knowledge base that I am trying to equate. Equality is based on a number of different variables contained in the objects. Once I find equal objects I set a status member in each to "Matched", otherwise it will be "OneKnows" or "TwoKnows".
After I fire the rules I use queries that I call from Java code to get the three different types of objects.
query "OneFirmKnows"
oRecord : MyObject1( status=="OneKnows" )
end
query "TwoKnows"
oRecord : MyObject2( status=="TwoKnows" )
end
query "Matched"
oRecord : MyObject1( status=="Matched" )
end
Each query sends back all objects no matter what the status is. The objects have a getStatus( ) method. What am I doing wrong?
Thanks!
Dennis
14 years
Query query...
by Dennis Duggan
I have 2 types of objects in my knowledge base that I am trying to equate. Equality is based on a number of different variables contained in the objects. Once I find equal objects I set a status member in each to "Matched", otherwise it will be "OneKnows" or "TwoKnows".
After I fire the rules I use queries that I call from Java code to get the three different types of objects.
query "OneFirmKnows"
oRecord : MyObject1( status=="OneKnows" )
end
query "TwoKnows"
oRecord : MyObject2( status=="TwoKnows" )
end
query "Matched"
oRecord : MyObject1( status=="Matched" )
end
Each query sends back all objects no matter what the status is. The objects have a getStatus( ) method. What am I doing wrong?
Thanks!
Dennis
14 years
Guvnor and oryx designer problems
by melc
Hello everyone,
I have added a sample.bpmn workflow (this is the default eclipse sample with
an extra Script Task printing goodbye to the console before ending) from
eclipse to guvnor, then i tried to edit the sample.bpmn from guvnor using
the oryx designer 1.0.0.026-SNAPSHOT from
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/1.0....
but no diagram is presented. The editor is shown (after removing the
servlet-api*.jar, slf4j*.jar and log4j*.jar (three or four jars in total)
related jars from the designer and placing two of the latest slf4j*1.6.0.jar
as found in guvnor.war into the libs of the jboss AS), but the diagram is
never displayed.
I've tried the following combinations,
- jboss-4.2.3.GA and jboss-5.1.0.GA
- guvnor version 5.1.1 and 5.2.0 SNAPSHOT from
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/t...
(when tried the 5.2.0 snapshot the editor is not presented at all, I only
get an "Error" dialog stating "Sorry, a technical error occured. Please
contact a system administrator". The corresponding error in the server.log
of the AS is provided at the end of the post. If i ran the editor in its own
tab via localhost:8080/designer/editor?uuid=the id of the asset, the editor
is shown but empty again)
- oryx designer 1.0.0.026-SNAPSHOT
So the question is what is the latest oryx designer version working
correctly with guvnor version 5.1.1 or 5.2.0 snapshot. Is anyone else having
such problems or am I doing something wrong here??
Thanks guys for your time and help.... looking forward to hearing from you.
---- log
----suspicious part??
2010-11-08 16:52:38,725 INFO [STDOUT] (null: 5, 196): schema_reference.4:
Failed to read schema document
'http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...',
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>.
2010-11-08 16:52:38,726 INFO [STDOUT] [2010:11:312 16:11:726:info]
KnowledgeAgent applying ChangeSet
2010-11-08 16:52:38,726 INFO [STDOUT] [2010:11:312 16:11:726:debug]
KnowledgeAgent notifier subscribing to resource=[UrlResource
path='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...']
2010-11-08 16:52:38,771 INFO [STDOUT] [2010:11:312 16:11:771:debug]
ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@11dd4fb to
resource=[UrlResource
path='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...']
2010-11-08 16:52:38,771 INFO [STDOUT] [2010:11:312 16:11:771:debug]
ResourceChangeScanner subcribing
notifier=org.drools.io.impl.ResourceChangeNotifierImpl@179c1cb to
resource=[UrlResource
path='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...']
2010-11-08 16:52:38,871 INFO [STDOUT] [2010:11:312 16:11:871:debug]
KnowledgeAgent rebuilding KnowledgeBase using ChangeSet
------.... and some more........
-----exception part
2010-11-08 16:52:40,543 INFO [STDOUT] Loading session data ...
2010-11-08 16:52:40,598 INFO [STDOUT] Error loading session data:
java.lang.reflect.InvocationTargetException
2010-11-08 16:52:40,598 INFO [STDOUT] Creating new session data ...
2010-11-08 16:52:40,662 INFO [STDOUT] Successfully loaded default package
from Guvnor
2010-11-08 16:52:50,783 INFO [STDOUT] DEBUG 08-11 16:52:50,782
(LoggingHelper.java:debug:65) Package: defaultPackage, asset: sample. Load
time taken for asset: 101
2010-11-08 16:52:50,824 INFO [STDOUT] ERROR 08-11 16:52:50,823
(LoggingHelper.java:error:76) Type
'org.drools.guvnor.client.rpc.RuleFlowContentModel' was not assignable to
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom
field serializer.For security purposes, this type will not be serialized.:
instance = org.drools.guvnor.client.rpc.RuleFlowContentModel@1e59f33
com.google.gwt.user.client.rpc.SerializationException: Type
'org.drools.guvnor.client.rpc.RuleFlowContentModel' was not assignable to
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom
field serializer.For security purposes, this type will not be serialized.:
instance = org.drools.guvnor.client.rpc.RuleFlowContentModel@1e59f33
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:610)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:534)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:700)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:730)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:612)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:534)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:609)
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:467)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:564)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
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.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
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.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)
2010-11-08 16:52:50,906 ERROR [STDERR]
com.google.gwt.user.client.rpc.SerializationException: Type
'org.drools.guvnor.client.rpc.RuleFlowContentModel' was not assignable to
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom
field serializer.For security purposes, this type will not be serialized.:
instance = org.drools.guvnor.client.rpc.RuleFlowContentModel@1e59f33
2010-11-08 16:52:50,906 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:610)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:534)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:700)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:730)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:612)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:534)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:609)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:467)
2010-11-08 16:52:50,907 ERROR [STDERR] at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:564)
2010-11-08 16:52:50,908 ERROR [STDERR] at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
2010-11-08 16:52:50,908 ERROR [STDERR] at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
2010-11-08 16:52:50,908 ERROR [STDERR] at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
2010-11-08 16:52:50,908 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
2010-11-08 16:52:50,908 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-11-08 16:52:50,908 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
2010-11-08 16:52:50,909 ERROR [STDERR] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
2010-11-08 16:52:50,909 ERROR [STDERR] at
java.lang.Thread.run(Thread.java:619)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Guvnor-and-oryx-desig...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years
[Drools Flow] checking Properties of supplied variables in constraints
by Gregor Ryba
Hi,
i am supplying an object as variable to my workflow. in a split i try to check the property "Type" of the
supplied object and according to it move on to the next actionnode (for testing purposes).
in the actionnode i am setting a string, that i am printing out later.
my test looks as follows:
first i supply a ticket with type "reviewer"
after this i supply a ticket with type "developer"
BUT i'm getting the following output:
Output1: processing developer ticket <reviewer>
Output2: processing developer ticket <developer>
so the ticket-object is injected correctly into the workflow, but
i have no clue, why the developer constraint is taken both times
any hints?
---------workflow file used------------
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
type="RuleFlow" name="Task Test" id="tasktest" package-name="workflows" routerLayout="2" >
<header>
<variables>
<variable name="ticket" >
<type name="org.drools.process.core.datatype.impl.type.ObjectDataType" className="org.openengsb.core.taskbox.model.Ticket" />
</variable>
</variables>
</header>
<nodes>
<start id="1" name="Start" x="103" y="26" width="49" height="49" />
<end id="2" name="End" x="107" y="393" width="49" height="49" />
<split id="7" name="Gateway" x="103" y="116" width="49" height="49" type="1" >
<constraints>
<constraint toNodeId="9" toType="DROOLS_DEFAULT" name="reviewer" priority="2" type="rule" dialect="java" >(ticket.getType()=="reviewer")</constraint>
<constraint toNodeId="8" toType="DROOLS_DEFAULT" name="developer" priority="1" type="rule" dialect="java" >(ticket.getType()=="developer")</constraint>
</constraints>
</split>
<actionNode id="8" name="dev" x="42" y="205" width="80" height="48" >
<action type="expression" dialect="java" >taskbox.setWorkflowMessage("processing developer ticket <" + ticket.getType() + ">");</action>
</actionNode>
<actionNode id="9" name="rev" x="150" y="205" width="80" height="48" >
<action type="expression" dialect="java" >taskbox.setWorkflowMessage("processing reviewer ticket <" + ticket.getType() + ">");</action>
</actionNode>
<join id="10" name="Gateway" x="104" y="302" width="49" height="49" type="2" />
</nodes>
<connections>
<connection from="10" to="2" />
<connection from="1" to="7" />
<connection from="7" to="8" />
<connection from="7" to="9" />
<connection from="8" to="10" />
<connection from="9" to="10" />
</connections>
</process>
14 years
Performance monitoring and hotspot detection in rules?
by H.C.
I am trying to implement a performance monitor to find the most problematic
rules in order to optimize performance. The main performance metrics I want
to gather are:
1. How any times a rule's conditions have been evaluated
2. How long each rule's condition evaluation took
3. How many times a rule's then clause actually executed
4. How long execution of a rule's then clause took
Are there any existing or recommended approaches to do this? I have looked
some at the AgendaEventListener methods but can't clearly map events to the
above. Is there some other logging interface with more events?
Thanks in advance.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Performance-monitorin...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years
Drools-flow: Event within foreach throws ClassCastException
by Liße, Jan
Hello,
i'm using the latest version 5.1.1 of drools-flow for a POC project.
I have a process definition where I have an intermediate event node within a foreach CompositeNode.
When I trigger the event using processInstance.signalEvent() I get a ClassCastException:
java.lang.ClassCastException: org.drools.workflow.core.node.CompositeContextNode cannot be cast to org.drools.workflow.core.node.EventNode
at org.drools.workflow.instance.node.EventNodeInstance.getEventNode(EventNodeInstance.java:62)
at org.drools.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:36)
at org.drools.workflow.instance.node.CompositeNodeInstance.signalEvent(CompositeNodeInstance.java:231)
at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:357)
at de.bdr.prototype.ProcessTest.main(ProcessTest.java:36)
Many thanks for any help!
-Jan
Below my process definition:
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
type="RuleFlow" name="flow" id="processOrders" package-name="order.flow" >
<header>
<variables>
<variable name="orderPreparationResult" >
<type name="org.drools.process.core.datatype.impl.type.UndefinedDataType" />
</variable>
<variable name="orders" >
<type name="org.drools.process.core.datatype.impl.type.ObjectDataType" className="java.util.List" />
</variable>
</variables>
</header>
<nodes>
<start id="1" name="Start" x="227" y="16" width="228" height="40" />
<forEach id="2" name="ForEach" x="16" y="88" width="650" height="196" variableName="order" collectionExpression="orders" >
<nodes>
<eventNode id="2" name="OrderPreparation Response" x="146" y="133" width="166" height="40">
<eventFilters>
<eventFilter type="eventType" eventType="OrderPreparationEvent" />
</eventFilters>
</eventNode>
<actionNode id="3" name="ORDER_PREP" x="9" y="53" width="151" height="50" >
<action type="expression" dialect="java" >System.out.println("Call Order prep");</action>
</actionNode>
<join id="4" name="Join" x="191" y="59" width="80" height="40" type="1" />
<actionNode id="5" name="ORDER_VALIDATION" x="300" y="56" width="141" height="40" >
<action type="expression" dialect="java" >System.out.println("Order validation");</action>
</actionNode>
<actionNode id="6" name="POPULATE_DB" x="470" y="55" width="152" height="40" >
<action type="expression" dialect="java" >System.out.println("Save to db");</action>
</actionNode>
</nodes>
<connections>
<connection from="3" to="4" />
<connection from="2" to="4" />
<connection from="4" to="5" />
<connection from="5" to="6" />
</connections>
<in-ports>
<in-port type="DROOLS_DEFAULT" nodeId="3" nodeInType="DROOLS_DEFAULT" />
</in-ports>
<out-ports>
<out-port type="DROOLS_DEFAULT" nodeId="6" nodeOutType="DROOLS_DEFAULT" />
</out-ports>
</forEach>
<end id="4" name="End" x="227" y="388" width="228" height="40" />
<actionNode id="5" name="NOTIFY " x="288" y="316" width="106" height="40" >
<action type="expression" dialect="java" >System.out.println("Notify");</action>
</actionNode>
</nodes>
<connections>
<connection from="1" to="2" />
<connection from="5" to="4" />
<connection from="2" to="5" />
</connections>
</process>
14 years
Same rules applies twice
by J-C Walmetz
Hi
I use Drools 5.01
I have the following rules:
rule "Reload test" salience 10000
when
$result: Result( $resultId:resultId)
not (exists Test(resultId.technicalId==$resultId.technicalId))
then
Test test = createTest($resultId);
insert(test);
end
When I insert two results with the same identifier, rules is applyed 2 times.
One for each result. I do not understand why.
Do you have an idea of what's happen and how to guratantee that myl rules will
not be applied twice. Here order is not important ...
Thanks
14 years