Re: [rules-users] GWT Console and WSHT Rendering
by sam.squire@paretopartners.com
I have worked it out using the sourcecode.
To retrieve variables in forms from your process, you can use two
Freemarker variables:
- Task is for human task information fields. Take a look at the Task
class and the TaskData class to see what you can access from your
template.#
This way you can also get to your task metadata like:
${task.taskData.createdOn?datetime} would get the date the task was
created.
- Content is for your own mapped fields.
You will have to make a dataInputAssociaton that has the name of "Content"
and use a dataInputAssociation to provide it with a HashMap of the values
you want to be available in your template. The HashMap you put into
content is accessible by content.<keyName> from the template.
Is this the official way to do it or is there a better way?
Thanks.
Sam Squire
This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures.
15 years, 5 months
parallel folw execution
by borg
Hello,
I was trying to understand what would happen if several events/object of the
same type, which is used to start a flow, occur simultaneously or before
each flow execution they trigger would end.
Would i have several running instances of the flow for each trigger event?
Or would it wait turns to run each event/object through the same instance
sequentially?
As a practical example, one could imagine the typical loan approval example
and consider such events/objects the loan requests.
My point is exactly that each request does not affect the others (previous
or future) and as such they should all run in parallel (only limited because
of the paralelization capacity of the available resources).
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/parallel-folw-executi...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 5 months
Some rule packages have disappeared in Guvnor
by John Peterson
Hey all,
We restarted our JBoss Server (version 4.2.3.GA) on Linux and after the
restart completed, we noticed that some of our packages (2) have
disappeared. I've gone through the server log and there is an error
(PathNotFoundException) for one of the missing packages, which I've
pasted below. Included in Guvnor is the default package (still
present), the mortgages example package (still present), and another
working package for testing ideas (also still present).
Has anyone seen this type of error before? Also, can someone tell me
where these packages are stored in Guvnor so we can verify that the
missing package is still out there? Any help would be appreciated.
Thanks!
2010-10-15 13:41:48,241 INFO [STDOUT] Checking access for : Home
Mortgage
2010-10-15 13:41:48,241 INFO [STDOUT] Checking access for : Commercial
Mortgage
2010-10-15 13:42:43,975 INFO [STDOUT] ERROR 15-10 13:42:43,971
(RulesRepository.java:loadPackage:369) Unable to load a rule package.
javax.jcr.PathNotFoundException: com.rulepackage
at
org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2470)
at
org.drools.repository.RulesRepository.loadPackage(RulesRepository.java:3
64)
at
org.drools.guvnor.server.files.FileManagerUtils.getLastModified(FileMana
gerUtils.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationCon
text.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInte
rceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionIntercept
or.java:77)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextI
nterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:157)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107
)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBea
nInterceptor.java:166)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.
java:102)
at
org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_8.getLastMo
dified(FileManagerUtils_$$_javassist_8.java)
at
org.drools.guvnor.server.files.PackageDeploymentServlet.getLastModified(
PackageDeploymentServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:705)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpSe
rvletRequest.java:53)
at
org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
r.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:182)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
ava: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(CachedConn
ectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
62)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
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:636)
2010-10-15 13:42:44,005 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/drools
-guvnor].[PackageDeploymentServlet]] Servlet.service()
for servlet PackageDeploymentServlet threw exception
javax.jcr.PathNotFoundException: com.rulepackage
at
org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2470)
at
org.drools.repository.RulesRepository.loadPackage(RulesRepository.java:3
64)
at
org.drools.guvnor.server.files.FileManagerUtils.getLastModified(FileMana
gerUtils.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationCon
text.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInte
rceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionIntercept
or.java:77)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextI
nterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:157)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107
)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBea
nInterceptor.java:166)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.
java:102)
at
org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_8.getLastMo
dified(FileManagerUtils_$$_javassist_8.java)
at
org.drools.guvnor.server.files.PackageDeploymentServlet.getLastModified(
PackageDeploymentServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:705)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
15 years, 5 months
Re: [rules-users] Stateless K-Session but no Sequential Mode
by Greg Barton
The stateless session is just a convenience wrapper around the stateful session.
GreG
On Oct 20, 2010, at 6:52, "Swindells, Thomas" <TSwindells(a)nds.com> wrote:
That is enough reason in itself - why go to the bother of having to do inserts, fire all rules and dispose separately when stateless sessions do that all for you - as the javadoc says:
"StatelessKnowledgeSession provides a convenience API, wrapping StatefulKnowledgeSession. It avoids the need to call dispose()."
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-
bounces(a)lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: 20 October 2010 12:34
To: Rules Users List
Subject: Re: [rules-users] Stateless K-Session but no Sequential Mode
If I understand this correctly, there isn't much point in having a
non-sequential-mode stateless session.
If I want a one-shot execution, I can call inserts, fireAllRules and
dispose() just as well in a stateful session.
Possibly this is due to past development.
Thanks!
-W
On 20 October 2010 09:13, Swindells, Thomas <TSwindells(a)nds.com> wrote:
I've not used it but from what I understand:
Sequential mode:
1. Insert facts
2. Create activations.
3. Fire all activations.
4. Done.
None Sequential (Standard) mode:
1. Insert facts.
2. Create initial activations.
3. Pop and fire highest salience activation.
4. Update activations (if update, retract etc was performed).
5. If there are more activations goto 3.
6. Done.
They key difference is that in the standard mode rule consequences can
activate and deactivate activations as they update the working memory.
Thomas
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-
bounces(a)lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: 19 October 2010 22:34
To: Rules Users List
Subject: Re: [rules-users] Stateless K-Session but no Sequential Mode
Indeed I have, and I've read it down to the last paragraph:
"Sequential mode can only be used with a Stateless Session and is off
by default. To turn it on, either call..." This tells me about a
StatelessKnowledgeSession WITH sequential mode.
So, what if I create a StatelessKnowledgeSession from a KnowledgeBase,
but do not turn sequential mode on?
Best
-W
2010/10/19 Michael Anstis <michael.anstis(a)gmail.com>:
No doubt I'm missing the point but have you seen "3.3.7.1. Sequential
Mode"
in Expert's documentation?
On 19 October 2010 21:27, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
As I understand the Expert documentation, Sequential Mode has to be
turned on, even with a Stateless Knowledge Session to achieve all the
shortcuts and speed-ups.
What the documentation does not tell me (or I haven't seen it) is the
difference of a Stateless Knowledge Session with and without Sequential
Mode.
Cheers
Wolfgang
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
******************************************************************************
********
This message is confidential and intended only for the addressee. If you
have received this message in error, please immediately notify the
postmaster(a)nds.com and delete it from your system as well as any copies. The
content of e-mails as well as traffic data may be monitored by NDS for
employment and security purposes. To protect the environment please do not
print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18
4EX, United Kingdom. A company registered in England and Wales. Registered no.
3080780. VAT no. GB 603 8808 40-00
******************************************************************************
********
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 5 months
gwt-console-server resteasy 1.0.2 and BPMN serviceTasks
by sam.squire@paretopartners.com
Hello there,
I am having a problem with the gwt-console-server and resteasy JBoss
library. My serviceTask uses resteasy to communicate with a different
server. The conflict is that gwt-console-server uses resteasy 1.0.2 and my
application uses 2.0.1.
How do I isolate the libraries used by gwt-console-server and my
serviceTasks?
What is the best way to solve this problem? I have tried downgrading my
application to 1.0.2 (breaks my application) and upgrading the server to
2.0.1 (breaks the server) but without code changes this is unlikely to
work.
Will GWT console ever be upgraded to 2.0.1?
Sam Squire
This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures.
15 years, 5 months
Stateless K-Session but no Sequential Mode
by Wolfgang Laun
As I understand the Expert documentation, Sequential Mode has to be
turned on, even with a Stateless Knowledge Session to achieve all the
shortcuts and speed-ups.
What the documentation does not tell me (or I haven't seen it) is the
difference of a Stateless Knowledge Session with and without Sequential Mode.
Cheers
Wolfgang
15 years, 5 months
Does Knowledgebase partitioning work at all?
by Tim 4076
I am attempting to use the multi thread knowledgebase partitioning
feature on drools 5.1, but am not having much luck. Using a stateless
session with MultithreadEvaluationOption.YES and
MaxThreadsOption.get(2) always gives a NullPointer exception:
java.lang.NullPointerException
at org.drools.reteoo.PartitionManager.waitForPendingTasks(PartitionManager.java:105)
at org.drools.common.AbstractWorkingMemory.prepareToFireActivation(AbstractWorkingMemory.java:2090)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:845)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)
at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:302)
at com.sample.DroolsTest.main(DroolsTest.java:70)
This looks similar to JIRA 2125, which was raised over a year ago.
Does this mean that this feature is completely non-functional?
Thanks,
Tim
15 years, 5 months
Unexpected performance difference on different hardware
by Tim 4076
My dev box runs Windows XP with an oldish intel core 2. It processes my
rules in 13s, with a peak memory usage of about 600MB.
When I run the exact same code on my 64bit linux server with a quad 2.40Ghz
Xeon, it takes 22s and uses a peak of 1.5Gb memory.
What on earth is going on here? I would expect it to run faster on the
server and for the memory usage to be similar.
Cheers,
Tim
15 years, 5 months
Re: [rules-users] Get rid of redundant conditions in combined rules.
by Leonardo Gomes
If your problem is performance, don't worry. Conditions evaluation is
shared, so in the second rule you won't re-evaluate the entire working
memory (to know more:http://www.drdobbs.com/184405218).
If you're worried about not having to repeat the conditions on the second
rule, I would create inferred facts when the first rule matches and use then
in the second rule + the additional conditions.
Something like:
Rule1:
when
customer:Customer(town=="London")
then
insert new LondonCustomer( customer );
Rule2:
when
london : LondonCustomer(customer.job=="TEACHER")
then
System.out.println(london.customer.getLname() + " is a
teacher");
2010/10/12 Dominik Hüttner <d.huettner(a)tiq-solutions.de>
> Hello everyone,
>
> I’ve got a question. I’m using drools-guvnor to execute some
> rule-scenarios. I have to solve the following problem: I have an amount of
> objects in my working memory and can’t remove objects from the working
> memory in the then-part of the rule. I want to combine two rules, the first
> rule selects some objects and the second rule checks only these selected
> objects for additional criteria. I have to use two rules, because I want to
> report the objects selected in the first rule, too. Now I have implemented
> this with two rules and in the second rule, the criterias of the first rule
> are copied to the second rule, my question is, is there a way to get rid of
> this redundandance?
>
> I have tried this with a rule flow, but the problem is, this always works
> on the whole working memory, but I can’t remove the not used objects from
> working memory for performance reasons. Is there another way to solve this
> problem?
>
>
>
> Here is an example for what I intend to do:
>
>
>
> Rule1:
>
> when
>
> customer:Customer(town=="London")
>
> then
>
> System.out.println(customer.getLname() + " is inhabitant of
> London");
>
>
>
> Rule2:
>
> when
>
> customer:Customer(town=="London",job=="TEACHER")
>
> then
>
> System.out.println(customer.getLname() + " is a teacher");
>
>
>
> This example illustrates, with the first rule I want to get to know, how
> many customers are from London and in the second rule I want to know, how
> many of the London customers are teachers. I want to create a kind of
> statistics. I have quite a lot of conditions for the first rule, so I don’t
> want to have them redundantly.
>
>
>
> Greetings, Dominik
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
15 years, 5 months