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.
15 years, 7 months
[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>
15 years, 7 months
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.
15 years, 7 months
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>
15 years, 7 months
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
15 years, 7 months
Some Problem with drools-persistence-jpa Library
by tangrui.cn@gmail.com
Hi list,
The attachment is a very simple test case to demonstrate an application
using Drools Persistence JPA (5.1.1).
Usage:
1. set up a mysql database called framework
2. set the user/password are root/root (or change the
bitronix-datasources.properties file)
3. run maven test
The core lines are as following:
StatefulKnowledgeSession ksession =
JPAKnowledgeService.newStatefulKnowledgeSession(kbase, conf, env);
ProcessInstance pi = ksession.startProcess("com.zyeeda.system.TestFlow");
pi.signalEvent("signal", "goon");
When executing the 3rd line, an exception occurred
java.lang.NullPointerException
at
org.drools.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:67)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.getWorkflowProcess(WorkflowProcessInstanceImpl.java:185)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:346)
at com.zyeeda.test.AppTest.testProcessPersistence(AppTest.java:84)
I've headed into the code and find that some working memory related to the
ProcessInstanceImpl is null.
(drools-core/src/main/java/org/drools/process/instance/impl/ProcessInstanceImpl.java)
But I cannot get why this does happen. Please give me some tips.
I tried to google some solutions, but find only this one (
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Events-No...),
but it seems that he solved this problem by using a custom command.
Thank you!
--
唐睿
15 years, 7 months
Custom UI for Drools rules
by Balasenthil D
Hi,
Is it possible to create a custom UI to create/edit drools rules( instead of Drools Guvnor). Are there APIs that let you do it?
For e.g., oracle provides a java API for create/edit rules. With this you can come up with your own UI, if you are not happy with jdeveloper.
Is something similar possible with Drools too?
Thank you
Bala
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
15 years, 7 months
Error with update in Guvnor
by John Peterson
Hi all,
I'm getting a strange error when I run my rules deployed from Guvnor.
Here's the rule:
WHEN
Fact1 [f1]
Flag1 = false
Flag2 = false
Fact2 [f2]
KeyField = f1.KeyField
THEN
f1.Flag2 = true;
update(f1);
f2.count1 = f2.count1 - 1;
f2.count2 = f2.count2 - 1;
f2.count3 = f2.count3 - 1;
f2.count4 = f2.count4 - 1;
f2.count5 = f2.count5 - 1;
update(f2);
I get the following error in my console when I run:
Exception in readKnowledgeBase: [Error: illegal use of operator:
PROJECT]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0]
If I remove the second update, it runs without error (but my rules
dependent on the updated f2 don't work). I'm doing this in the Guided
Editor. I've tried both "Modify the values of f2" and doing the update
as free form DRL ("update(f2);"). As listed above, if I put a print
between the last assignment and the update, I get the print results
before the error. If I put the print last, I never see it, so I'm 99.9%
certain it is choking on my update.
Version Specifics:
- Guvnor 5.0.1
- Drools 5.0.1
- JBoss 4.2.3.GA
Any help/guidance would be appreciated!
15 years, 7 months
Guvnor : Globals and variables in test scenario
by Stela Dabija
Using : Guvnor 5.2 (in development)
Tomcat 6.0.28
Java 1.6.0_20
Looks like there is an issue when creating a TestScenario which:
1. Has some fact field set to a variable
2. And, Has some global variable
Steps:
1. In the package configuration define a global variable : "global
Object glVar"
2. Create new Declarative model (see attached image S1_model):
a. FactType : name ="FType1"
b. FactType : name = "FType2"
i.
Field : name="ch"/type="FType1"
c. FactyType : name = "FType3"
i.
Field : name="ch"/type="FType2"
3. Create new TestScenario (see attached images
S2_TestScenario_before and S3_TestScenario_after):
a. Insert a new fact : type="FType2", varName = "f2"
b. Insert a new fact : type = "FType3", varName="f3"
i.
Add a field : name="ch", value = "=f2" (bound to variable f2)
c. Add new Global (glVar).
Observed: after adding the global variable nothing in the TestScenario
screen is displayed.
It is not possible to make any changes to the TestScenario content (for
ex delete the global var).
After saving the TestScenario it is no longer possible to open it.
Do you know if there is any workaround? Is there an open issue for this?
Thank you,
Stela
15 years, 7 months
How to count distinct?
by Yaniv Itzhaki
Hi All,
I need to go over a not distinct list and count distinct each element in the
list.
for example:
Object XXX {
int id;
String type;
}
XXX:
id type
1 A
2 B
3 A
4 C
5 C
The rule should be activated per type and give as a result the count of each
type:
A 2
B 1
C 2
Thanks
15 years, 7 months