[flow][bpmn2] Variable not available in workitem?
by David Wynter
Hi,
My first bpmn2 workflow. With this the important part of the bpmn2 xml
definition, transformationTest.bpmn2.
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="Definition"
targetNamespace="http://www.jboss.org/drools"
typeLanguage="http://www.java.com/javaTypes"
expressionLanguage="http://www.mvel.org/2.0"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
BPMN20.xsd"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns="http://www.jboss.org/drools">
<itemDefinition id="_ETLGroupItem"
structureRef="com.example.model.impl.ETLGroupImpl" />
<process processType="Private" isExecutable="true" id="Test" name="Test
Process" >
<!-- process variables -->
<property id="ETLGroup" itemSubjectRef="_ETLGroupItem"/>
<!-- nodes -->
<startEvent id="_1" name="StartProcess" />
<task id="_2" name="ETLGroup" tns:taskName="ETLGroup" >
<ioSpecification>
<inputSet>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
</task>
<endEvent id="_3" name="End" >
<terminateEventDefinition/>
</endEvent>
<!-- connections -->
<sequenceFlow id="_1-_2" sourceRef="_1" targetRef="_2" />
<sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3" />
</process>
I have this test case
@Before
public void setUp() throws Exception {
KnowledgeBuilder kb = KnowledgeBuilderFactory.newKnowledgeBuilder();
kb.add(ResourceFactory.newClassPathResource("transformationTest.bpmn2"),
ResourceType.BPMN2);
if (kb.hasErrors()) {
throw new RuntimeException(kb.getErrors().toString());
}
KnowledgeBaseConfiguration configuration =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
configuration.setProperty("drools.workDefinitions", "WorkDefinitions.conf
etlgroup.conf");
KnowledgeBase knowledgeBase =
KnowledgeBaseFactory.newKnowledgeBase(configuration);
knowledgeBase.addKnowledgePackages(kb.getKnowledgePackages());
session = knowledgeBase.newStatefulKnowledgeSession();
TrackingProcessEventListener trackingprocel = new
TrackingProcessEventListener();
session.addEventListener(trackingprocel);
session.getWorkItemManager().registerWorkItemHandler("ETLGroup", new
ETLGroupWorkItemHandler());
WorkflowLoader wrkflwLdr = new WorkflowLoader();
etlGroup = wrkflwLdr.loadETLGroup("etlGroup",
"/home/david/workspace/EDMEngine/META-INF/content.xml");
}
@Test
public void testSessionRun() {
Map<String, Object> parameterMap = new HashMap<String, Object>();
parameterMap.put("ETLGroup", etlGroup);
session.insert(etlGroup);
ProcessInstance processInstance = session.startProcess("Test", parameterMap);
session.insert(processInstance);
session.fireAllRules();
}
I have this work item handler
public class ETLGroupWorkItemHandler implements WorkItemHandler {
private ETLGroupService service = null;
@Override
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
ETLGroup etlGrp = (ETLGroup) workItem.getParameter("ETLGroup");
...
etlGroup in the @Before section is not null but etlGrp is always null? I must
have missed something, but cannot see what it is. Can someone point it out to
me?
Thx.
David
15 years, 4 months
Support for Drools Guvnor / Expert in Latin America
by Miguel Fernando Cabrera
Hello to all,
In my company (an insurance company in Colombia) and we are evaluating
various BRMS.
We have been testing iLog JRules and now we are evaluating Drools
Expert/Guvnor (or JBoss BRMS).
As I am an open source guy, I want to use Drools. As we use a lot of
open source libraries right now (like CXF) is easy for me to use the BRE as
a library.
However, when planning to use a full BRMS like Guvnor, we will need someone
to install and support it.
The obvious choice would be Red Hat / JBoss, However we have tried to
contact sales department but it has been impossible to get an aswer from
them.
So, my question is, Does Anyone know a company (could be the states or south
america) willing to provide the installation and support services for the
BRMS and the maybe the BRE ?
I really appreciate any help on the matter.
--
Miguel Fernando Cabrera Granados
"A los hombres fuertes les pasa lo que a los barriletes; se elevan cuando es
mayor el viento que se opone a su ascenso." - José Ingenieros
15 years, 4 months
Using an array column header in Drools Template
by sk
I am given a list of strings (Comma separated) as input and I need to check
if any of the strings satisfy a given condition. I am trying to implement it
using Drools Rule template with an array column header of unknown size.
To be more specific I need to be be able to generalize the below Template to
include any number of names in the eval statement.
The idea is to give any number of names as input and check if any of the
names satisy the condition given in the template.
template header
name[]
package gms.drools.templates;
global java.util.Map nameMap;
import java.util.Map;
template "RuleTemplate_name"
rule "rule_name"
when
//Generalize the below line to check if the nameMap contains any of the
names given in the input //eval(nameMap.containsKey("@{name1}") ||
nameMap.containsKey("@{name2}") || nameMap.containsKey("@{name3}") ||
nameMap.containsKey("@{name4}"))
then
System.out.println("SUCCESS");
end
end template
Please let me know if anyone has a solution for this or any other
suggestions.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-an-array-column...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
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
15 years, 4 months
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
15 years, 4 months
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
15 years, 4 months
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
15 years, 4 months
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, 4 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, 4 months