Decision table multiple sheets...
by Sumeet Karawal
Hi,
I am having my rules in a Decision Table (.xls)
There I have 3 sheets for rules.
Like in Sheet1 there are two Rule Tables... In Sheet2 there are 2 and in
Sheet3 there is only 1.
When I am creating the knowledgebase and firing rules, the rules that are
in the Sheet1 are getting fired. But the rules in other sheets are not
getting fired.
When I convert them to String to check using this code :
String str = DecisionTableFactory.loadFromInputStream
(ResourceFactory.newClassPathResource
("com/sample/MemberDiscountRules.xls").getInputStream(), dtconf);
System.out.println(str);
I can see the rules that are present in Sheet1 only.
Please anybody help me on this. How can I get the rules in other two sheets
to get fired.
Also how can we fire the rules of only a particular Rule table in the
decision table.
Thanks & Regards,
Sumeet
Mailto: sumeet.karawal(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
13 years
Drools Planner Advise
by Raúl Raja Martínez
Hello everyone,
I'm looking for a Drools Planner consultant that can help review and advise on a application that we are building related to scheduling.
If anybody has drools planner experience and it's interested, please msg me at raul(a)47deg.com or reply to this email.
Thanks in advance,
--
Raúl Raja Martínez
http://47deg.com
13 years
added features in Guvnor 5.4.0 Beta
by G S
Where I can see the added features of Guvnor 5.4.0 Beta?
I checked the documentation. 1.2 Features Outline, it seems same as 5.3.0 Final
13 years
Running rules from the past
by Celso Junior
Hi folks,
I work at a bank and I am currently studying the best way to use JBoss
Rules so that it fits our needs. Our loan analysis process can take several
months depending on the type of the loan. Although our business rules can
evolve, a loan must follow the rules valid at the time the loan application
was made.
In order to attend this requirement I thought about storing at the database
the name of the current snapshot with the loan application data, so that it
will possible run this rules in the future without freezing my rule
database.
* Is there a better way to attend this requirement?
* How can I retrieve meta information from a snapshot, such as the date
when the snapshot was created?
Thanks in advance,
Celso
13 years
Performance consideration in rule writing
by Zhuo Li
Hi, team,
I have some quick questions here regarding performance best practices of
rule writing. See below two pieces of rules:
Rule "1"
Salience 100
No-loop true
When $txn : data(sourceid ==
5&&txnjustify=="995"&&eval(creditOption($txn)==1)&&eval(isGCSwitch($txn))&&i
sCurrencyEquals($txn)==0&&compareToPostThreshold($txn)==2);
Then
.
End
Rule "2"
Salience 100
No-loop true
When $txn : data(sourceid ==
5&&txnjustify=="995"&&eval(creditOption($txn)==1)&&eval(isGCSwitch($txn))&&i
sCurrencyEquals($txn)==0&&compareToPostThreshold($txn)==1);
Then
.
End
Questions:
1. Will I gain better performance if I put the rule differentiator
condition "compareToPostThreshold($txn)==2" at the beginning of both rule 1
and 2?
2. I saw salaboy's video claiming that to avoid using eval() in the
rule. Do we have any alternative way to do that from a performance
consideration or I'd better collect/ prepare all the data before I send them
into the session?
3. What's you guys' naming convention for rule's salience?
PS: my Drools version is 5.2.0.
Best regards
Abe
13 years
答复: Performance consideration in rule writing
by Zhuo Li
Any question is also about performance consideration. See below example:
Rule “1”
Dialect “mvel”
Salience 300
No-loop true
When
$acctsrc: data(sourceid==1)
$reposrc:
data((sourceid==2||sourceid==5)&&amount==acctsrc.amount)
Then
…
End
Two questions here:
1. In this kind of join conditions, is there any best practice to
follow in the rule? I heard from somebody that I need to put data who have
less # of transactions first in my when expression. For example, if I have
less number of $reposrc transactions in facts, I should put it ahead of
$acctsrc to gain better performance. Is this valid?
2. Do we know how to create an event listener in the rule for logging
purpose rather than standard log4j? It was recommended in some other
articles as well. Is this also valid?
(http://www.technologyblue.com/docs/presentations/DroolsBestPractices.pdf);
Ultimately, is there any place I can find a best practice of rule
development as a generic guide?
Best
Abe
发件人: Zhuo Li [mailto:milanello1998@gmail.com]
发送时间: 2011年12月26日 16:51
收件人: 'Rules Users List'
主题: Performance consideration in rule writing
Hi, team,
I have some quick questions here regarding performance best practices of
rule writing. See below two pieces of rules:
Rule “1”
Salience 100
No-loop true
When $txn : data(sourceid == 5&&txnjustify==”995”
&&eval(creditOption($txn)==1)&&eval(isGCSwitch($txn))&&isCurrencyEquals($txn
)==0&&compareToPostThreshold($txn)==2);
Then
…
End
Rule “2”
Salience 100
No-loop true
When $txn : data(sourceid == 5&&txnjustify==”995”
&&eval(creditOption($txn)==1)&&eval(isGCSwitch($txn))&&isCurrencyEquals($txn
)==0&&compareToPostThreshold($txn)==1);
Then
…
End
Questions:
1. Will I gain better performance if I put the rule differentiator
condition “compareToPostThreshold($txn)==2” at the beginning of both rule
1 and 2?
2. I saw salaboy’s video claiming that to avoid using eval() in the
rule. Do we have any alternative way to do that from a performance
consideration or I’d better collect/ prepare all the data before I send
them into the session?
3. What’s you guys’ naming convention for rule’s salience?
PS: my Drools version is 5.2.0.
Best regards
Abe
13 years
Problems saving BPMN2 diagrams in Guvnor
by Cristiano Gavião
Hi,
I'm playing with Guvnor from jbpm-5.2.0.Final-installer-full using Jboss
AS7. I'm using the Chrome browser
I could create a bpmn2 diagram and play with it. After save it,
sometimes I get a blank canvas and sometimes it is not saving the changes.
I can open the file and see all my saving messages on the Version
History folder, but when I try to open it..., it is blank...
Normally I couldn't see any error message at the console when it just
don't save the last change. but right now, that I lost all elements of
my diagram (I mean, there is a blank canvas) I got this:
> 00:50:21,761 INFO [stdout] (http--127.0.0.1-8080-5) (null: 47, 119):
> cvc-complex-type.4: Attribute 'targetRef' must appear on element
> 'bpmn2:sequenceFlow'.
> 00:50:21,868 SEVERE [com.intalio.web.profile.impl.JbpmProfileImpl]
> (http--127.0.0.1-8080-3) null: java.lang.NullPointerException
> at
> com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshallSequenceFlow(Bpmn2JsonMarshaller.java:1441)
> [classes:]
> at
> com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshallFlowElement(Bpmn2JsonMarshaller.java:684)
> [classes:]
> at
> com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshallProcess(Bpmn2JsonMarshaller.java:422)
> [classes:]
> at
> com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshallDefinitions(Bpmn2JsonMarshaller.java:314)
> [classes:]
> at
> com.intalio.bpmn2.impl.Bpmn2JsonMarshaller.marshall(Bpmn2JsonMarshaller.java:157)
> [classes:]
> at
> com.intalio.web.profile.impl.JbpmProfileImpl$2.parseModel(JbpmProfileImpl.java:255)
> [classes:]
> at
> com.intalio.web.repository.impl.UUIDBasedJbpmRepository.load(UUIDBasedJbpmRepository.java:36)
> [classes:]
> at
> com.intalio.web.server.UUIDBasedRepositoryServlet.doGet(UUIDBasedRepositoryServlet.java:123)
> [classes:]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
> [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> com.intalio.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:75)
> [classes:]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
> [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
> at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
> [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
> at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]
Anyone have experiment some like this?
regards
Cristiano
13 years