Help command Length in LHS
by grupo cft ing sostware
Hello list, as I can obtain the length of a variable in LHS
when
v: Validaciones( fonodestino.length > 7)
then
....
In this way you give me error.
That do I do wrong?
thanks.
17 years, 3 months
Check for overlapping dates
by Brian Enderle
I have a situation where I need to check for overlapping dates in a collection
of previous addresses. I am only performing this check after checking that
the beginDate and endDate are not null.
Currently I am using an eval to perform an outside method. Does anyone know
if and how I could perform this same check using Drools.
Curently my rules look something like this
gloabl java.lang.Boolean dateErrorExists; // starts off as false
global ValidationUtils utils;
rule "beginDate must exist"
when
Address ( beginDate != null )
then
dateMissing = true;
<display error>
end
rule "endDate must exist"
when
Address ( endDate != null )
then
dateMissing = true;
<display error>
end
rule "Previous Address dates cannot overlap"
salience -10
when
eval (dateMissing)
eval (utils.doAddressDatesOverlap())
then
<display error>
end
Our system simply runs thru the data checking the rules (no facts are changed)
so the dateMissing global is reset to false everytime we perform our
validation.
The downside to this is I am having to re-get the data from the DB within the
doAddressDatesOverlap() function. This function orders the Address objects by
their startDates and then compares the endDate of one with the startDate of
the next and returns false if they overlap.
If anyone knows of a cleaner, simpler or better way to perform this check
within Drools I would appreciate the input.
Thanks in advance,
Brian Enderle
17 years, 3 months
problem with threads
by Raffaele Viola
Hi all,
I have a HashTable dawned by a thread T1, another thread T2 take this
HashTable and give it to the working memory as assertion.
what happens if T2 and JRools try to access to the HashTable?
Can I consider the working memory as a thread and use a method
synchronization to solve the concurrent access problem?
Thanks
Raffo
17 years, 3 months
Decision table actions
by Hehl, Thomas
I have at least figured out what was going on with my decision table.
I kept comparing what I was doing with the policy pricing example included
with drools and trying to figure out what I was doing different. Because of
the syntax of the rules I was getting back, it occurred to me that the issue
might be that I was never referencing my recipient object as part of the
condition.
I added a property to my BooleanAnswer object so it now looks like:
public class BooleanAnswer {
private boolean answer;
private int index = 2;
/**
* no-arg constructor
*/
public BooleanAnswer(){
}
/**
* create your own default answer
* @param answer the answer to set
*/
public BooleanAnswer(boolean answer){
setAnswer(answer);
}
/**
* @return the answer
*/
public boolean isTrue() {
return answer;
}
/**
* @param answer the answer to set
*/
public void setAnswer(boolean answer) {
this.answer = answer;
}
/**
* @return the index
*/
public int getIndex() {
return index;
}
/**
* @param index the index to set
*/
public void setIndex(int index) {
this.index = index;
}
I then modified my Decision table so it looks like:
CONDITION
ACTION
answer: BooleanAnswer
index
answer.setAnswer($param);
index
Allowed
2
TRUE
TRUE
This built the proper rule and works fine.
It appears that drools is not set up to store values in an object that was
not referenced in the condition. Is this true? If so, it seems this should
be a request for future enhancement.
If not, then how do I do this without referencing my recipient object in the
condition.
Thanks!
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
ACS, Inc.
Government Solutions
1733 Harrodsburg Road
Lexington, KY 40504-3617
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at Thomas.Hehl(a)acs-inc.com
<mailto:Thomas.Hehl@acs-inc.com> or by telephone at 859-277-8800 ext. 144.
Thank you.
17 years, 3 months
JBoss Rules 4 BRMS issues
by Baron, Stephen
Hi,
Im having a few issues getting JBRMS working as it keeps informing me of
errors/exceptions.
One such problem is when I attempt to Open a business rule. When trying this
I get the following exception:
javax.jcr.RepositoryException: Invalid UUID: : null: null
at
org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:792)
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
35)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:56)
Caused by: java.lang.IllegalArgumentException
at org.apache.jackrabbit.uuid.UUID.(UUID.java:121)
at org.apache.jackrabbit.uuid.UUID.fromString(UUID.java:161)
at
org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:789)
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
35)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
java.lang.IllegalArgumentException
at org.apache.jackrabbit.uuid.UUID.(UUID.java:121)
at org.apache.jackrabbit.uuid.UUID.fromString(UUID.java:161)
at
org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:789)
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
35)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
v
2007-08-29 10:51:45,500 INFO [STDOUT] iceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
2007-08-29 10:51:45,500 INFO [STDOUT] ERROR 29-08 10:51:45,500
(ApplicationContext.java:log:660) Exception while dispatching incoming RPC
call
org.drools.repository.RulesRepositoryException:
javax.jcr.RepositoryException: Invalid UUID: : null: null
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
40)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:56)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
Caused by: javax.jcr.RepositoryException: Invalid UUID: : null: null
at
org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:792)
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
35)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:56)
Caused by: java.lang.IllegalArgumentException
at org.apache.jackrabbit.uuid.UUID.(UUID.java:121)
at org.apache.jackrabbit.uuid.UUID.fromString(UUID.java:161)
at
org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:789)
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
35)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at org.jboss.seam.remoting.
2007-08-29 10:51:45,516 INFO [STDOUT]
gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAdapter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
Other errors that I get when navigating around include:
2007-08-29 10:38:32,188 INFO [STDOUT] ERROR 29-08 10:38:32,172
(ApplicationContext.java:log:660) Exception while dispatching incoming RPC
call
org.drools.repository.RulesRepositoryException:
javax.jcr.RepositoryException: Invalid UUID: : null: null
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
40)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:56)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
Caused by: javax.jcr.RepositoryException: Invalid UUID: : null: null
at
org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:792)
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
35)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAd
apter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:56)
Caused by: java.lang.IllegalArgumentException
at org.apache.jackrabbit.uuid.UUID.(UUID.java:121)
at org.apache.jackrabbit.uuid.UUID.fromString(UUID.java:161)
at
org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:789)
at
org.drools.repository.RulesRepository.loadAssetByUUID(RulesRepository.java:5
35)
at
org.drools.brms.server.ServiceImplementation.loadRuleAsset(ServiceImplementa
tion.java:257)
at
org.drools.brms.server.ServiceImplementation$$FastClassByCGLIB$$8f2fab45.inv
oke(ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(:???)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext
.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:57)
at
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterce
ptor.java:34)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInter
ceptor.java:47)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodCont
extInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at
org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterce
ptor.java:37)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext
.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInt
erceptor.java:154)
at
org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.j
ava:89)
at
org.drools.brms.server.ServiceImplementation$$EnhancerByCGLIB$$16dfe278.load
RuleAsset(Ljava.lang.String;)Lorg.drools.brms.client.rpc.RuleAsset;(:???)
at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava
.lang.Object;(Unknown Source)
at org.jboss.seam.remoting.
2007-08-29 10:38:32,188 INFO [STDOUT]
gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAdapter.java:70)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteSer
viceServlet.java:300)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceS
ervlet.java:181)
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(Application
FilterChain.java:290)
I am running 'drools-4.0.0-brms-standalone' on Windows XP using Suns
jdk1504. Any help would be greatly appreciated.
Thanks
Steve
LEGAL NOTICE
The information contained in this e-mail and any attachments are private and
confidential. This message is solely intended for a particular recipient, if
you are not the intended recipient you are prohibited from storing, copying,
disseminating or using the information in any way. If you received this
e-mail in error please notify the sender immediately. E-mail transmission
cannot be guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors, viruses or omissions in the contents of this message, which arise as
a result of transmission. This e-mail is not intended to create legally
binding commitments on behalf of Northern Rock plc, nor do its contents
reflect the corporate views or policies of Northern Rock plc.
Northern Rock plc, Registered Office Northern Rock House Gosforth Newcastle
upon Tyne NE3 4PL. Registered in England, number 3273685. Telephone No: 0191
2857191
Northern Rock plc is authorised and regulated by the Financial Services
Authority for deposit-taking; advising on and arranging mortgages and
general insurance; and for introducing life assurance and investments.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
17 years, 3 months
FW: [rules-users] FW: Decision Tables
by Hehl, Thomas
The reason that I feel that this is AT LEAST a documentation bug is that I
believe that I've coded my answer exactly as the ExamplePricingPolicy is
coded, but it produces invalid rules.
Can someone please confirm that I'm doing this right or tell me what I'm
doing wrong? Doesn't anyone on this list use decision tables and have some
counsel?
Thanks.
_____
From: Hehl, Thomas
Sent: Wednesday, August 29, 2007 1:23 PM
To: 'Rules Users List'
Subject: RE: [rules-users] FW: Decision Tables
Got that. How do I code the action so it calls the setAnswer() method on my
BooleanAnswer object?
_____
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Wednesday, August 29, 2007 12:59 PM
To: Rules Users List
Subject: Re: [rules-users] FW: Decision Tables
This isn't bug, you aren't using drools correctly. Only valid java can be
used in an Action. anAnswer:BooleanAnswer is not valid java and shows up in
your generated code:
anAnswer: BooleanAnswer.anAnswer.setAnswer(true);;
Hehl, Thomas wrote:
The problem appears to be that the rule being generated is just flat wrong.
I'm starting to think this is a bug in decision tables for 4.0 GA.
The following entry:
ACTION
anAnswer: BooleanAnswer
anAnswer.setAnswer($param);
Allowed
TRUE
TRUE
Generates this rule:
rule "postponePart_10"
when
PoolInfo(courtLocation == "101", statusCode >= 0, statusCode <=
2, numberFta < 1, numberOfDeferralsPosted < 2, daysBeforeSummons>= 1,
daysBeforeSummons<= 1)
then
anAnswer: BooleanAnswer.anAnswer.setAnswer(true);;
end
This doesn't seem right at all. What I'm trying to do is to call the
setAnswer method on the object I passed in with:
StatelessSession session =
participantRuleBase.newStatelessSession();
//now create some test data
PoolInfo pool = part.getActivePool();
BooleanAnswer answer = new BooleanAnswer();
Object[] rules = new Object[]{pool, answer};
session.execute(rules);
return answer.isTrue();
Advice?
Thanks.
_____
From: Hehl, Thomas
Sent: Tuesday, August 28, 2007 4:10 PM
To: 'rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org> '
Subject: Decision Tables
I'm having trouble figuring out the ACTION section of a decision table.
Everything else appears to be working.
My rules result in a simple True/False condition. To do this in a decision
table, I've created a class called BooleanAnswer that looks like:
public class BooleanAnswer {
private boolean answer;
/**
* no-arg constructor
*/
public BooleanAnswer(){
}
/**
* create your own default answer
* @param answer the answer to set
*/
public BooleanAnswer(boolean answer){
setAnswer(answer);
}
/**
* @return the answer
*/
public boolean isTrue() {
return answer;
}
/**
* @param answer the answer to set
*/
public void setAnswer(boolean answer) {
this.answer = answer;
}
}
Then I create a decision table with the following ACTION in it:
ACTION
answer: BooleanAnswer
answer.setAnswer($param);
Allowed
TRUE
This generates the following errors:
...
Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation error :
[Rule name=postponePart_15, agendaGroup=MAIN, salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_15_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_13, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_13_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_14, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_14_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_16, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_16_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_17, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_17_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_10, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_10_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_11, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_11_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_18, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_18_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_19, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_19_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_12, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_12_0.java (8:343)
: The field BooleanAnswer.answer is not visible
at org.drools.rule.Package.checkValidity(Package.java:408)
at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288)
at
com.acs.gs.juror.bizstrategy.PostponementStrategy.init(PostponementStrategy.
java:129)
... 14 more
)
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3T
estReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)
Help for a newbie, please?
Thanks.
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
ACS, Inc.
Government Solutions
1733 Harrodsburg Road
Lexington, KY 40504-3617
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at Thomas.Hehl(a)acs-inc.com
<mailto:Thomas.Hehl@acs-inc.com> or by telephone at 859-277-8800 ext. 144.
Thank you.
_____
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
<https://lists.jboss.org/mailman/listinfo/rules-users>
17 years, 3 months
RE: [rules-users] FW: Decision Tables
by Hehl, Thomas
Got that. How do I code the action so it calls the setAnswer() method on my
BooleanAnswer object?
_____
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Wednesday, August 29, 2007 12:59 PM
To: Rules Users List
Subject: Re: [rules-users] FW: Decision Tables
This isn't bug, you aren't using drools correctly. Only valid java can be
used in an Action. anAnswer:BooleanAnswer is not valid java and shows up in
your generated code:
anAnswer: BooleanAnswer.anAnswer.setAnswer(true);;
Hehl, Thomas wrote:
The problem appears to be that the rule being generated is just flat wrong.
I'm starting to think this is a bug in decision tables for 4.0 GA.
The following entry:
ACTION
anAnswer: BooleanAnswer
anAnswer.setAnswer($param);
Allowed
TRUE
TRUE
Generates this rule:
rule "postponePart_10"
when
PoolInfo(courtLocation == "101", statusCode >= 0, statusCode <=
2, numberFta < 1, numberOfDeferralsPosted < 2, daysBeforeSummons>= 1,
daysBeforeSummons<= 1)
then
anAnswer: BooleanAnswer.anAnswer.setAnswer(true);;
end
This doesn't seem right at all. What I'm trying to do is to call the
setAnswer method on the object I passed in with:
StatelessSession session =
participantRuleBase.newStatelessSession();
//now create some test data
PoolInfo pool = part.getActivePool();
BooleanAnswer answer = new BooleanAnswer();
Object[] rules = new Object[]{pool, answer};
session.execute(rules);
return answer.isTrue();
Advice?
Thanks.
_____
From: Hehl, Thomas
Sent: Tuesday, August 28, 2007 4:10 PM
To: 'rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org> '
Subject: Decision Tables
I'm having trouble figuring out the ACTION section of a decision table.
Everything else appears to be working.
My rules result in a simple True/False condition. To do this in a decision
table, I've created a class called BooleanAnswer that looks like:
public class BooleanAnswer {
private boolean answer;
/**
* no-arg constructor
*/
public BooleanAnswer(){
}
/**
* create your own default answer
* @param answer the answer to set
*/
public BooleanAnswer(boolean answer){
setAnswer(answer);
}
/**
* @return the answer
*/
public boolean isTrue() {
return answer;
}
/**
* @param answer the answer to set
*/
public void setAnswer(boolean answer) {
this.answer = answer;
}
}
Then I create a decision table with the following ACTION in it:
ACTION
answer: BooleanAnswer
answer.setAnswer($param);
Allowed
TRUE
This generates the following errors:
...
Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation error :
[Rule name=postponePart_15, agendaGroup=MAIN, salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_15_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_13, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_13_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_14, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_14_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_16, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_16_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_17, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_17_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_10, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_10_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_11, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_11_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_18, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_18_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_19, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_19_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_12, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_12_0.java (8:343)
: The field BooleanAnswer.answer is not visible
at org.drools.rule.Package.checkValidity(Package.java:408)
at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288)
at
com.acs.gs.juror.bizstrategy.PostponementStrategy.init(PostponementStrategy.
java:129)
... 14 more
)
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3T
estReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)
Help for a newbie, please?
Thanks.
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
ACS, Inc.
Government Solutions
1733 Harrodsburg Road
Lexington, KY 40504-3617
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at Thomas.Hehl(a)acs-inc.com
<mailto:Thomas.Hehl@acs-inc.com> or by telephone at 859-277-8800 ext. 144.
Thank you.
_____
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
<https://lists.jboss.org/mailman/listinfo/rules-users>
17 years, 3 months
FW: Decision Tables
by Hehl, Thomas
The problem appears to be that the rule being generated is just flat wrong.
I'm starting to think this is a bug in decision tables for 4.0 GA.
The following entry:
ACTION
anAnswer: BooleanAnswer
anAnswer.setAnswer($param);
Allowed
TRUE
TRUE
Generates this rule:
rule "postponePart_10"
when
PoolInfo(courtLocation == "101", statusCode >= 0, statusCode <=
2, numberFta < 1, numberOfDeferralsPosted < 2, daysBeforeSummons>= 1,
daysBeforeSummons<= 1)
then
anAnswer: BooleanAnswer.anAnswer.setAnswer(true);;
end
This doesn't seem right at all. What I'm trying to do is to call the
setAnswer method on the object I passed in with:
StatelessSession session =
participantRuleBase.newStatelessSession();
//now create some test data
PoolInfo pool = part.getActivePool();
BooleanAnswer answer = new BooleanAnswer();
Object[] rules = new Object[]{pool, answer};
session.execute(rules);
return answer.isTrue();
Advice?
Thanks.
_____
From: Hehl, Thomas
Sent: Tuesday, August 28, 2007 4:10 PM
To: 'rules-users(a)lists.jboss.org'
Subject: Decision Tables
I'm having trouble figuring out the ACTION section of a decision table.
Everything else appears to be working.
My rules result in a simple True/False condition. To do this in a decision
table, I've created a class called BooleanAnswer that looks like:
public class BooleanAnswer {
private boolean answer;
/**
* no-arg constructor
*/
public BooleanAnswer(){
}
/**
* create your own default answer
* @param answer the answer to set
*/
public BooleanAnswer(boolean answer){
setAnswer(answer);
}
/**
* @return the answer
*/
public boolean isTrue() {
return answer;
}
/**
* @param answer the answer to set
*/
public void setAnswer(boolean answer) {
this.answer = answer;
}
}
Then I create a decision table with the following ACTION in it:
ACTION
answer: BooleanAnswer
answer.setAnswer($param);
Allowed
TRUE
This generates the following errors:
...
Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation error :
[Rule name=postponePart_15, agendaGroup=MAIN, salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_15_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_13, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_13_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_14, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_14_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_16, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_16_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_17, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_17_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_10, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_10_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_11, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_11_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_18, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_18_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_19, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_19_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_12, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_12_0.java (8:343)
: The field BooleanAnswer.answer is not visible
at org.drools.rule.Package.checkValidity(Package.java:408)
at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288)
at
com.acs.gs.juror.bizstrategy.PostponementStrategy.init(PostponementStrategy.
java:129)
... 14 more
)
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3T
estReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)
Help for a newbie, please?
Thanks.
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
ACS, Inc.
Government Solutions
1733 Harrodsburg Road
Lexington, KY 40504-3617
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at Thomas.Hehl(a)acs-inc.com
<mailto:Thomas.Hehl@acs-inc.com> or by telephone at 859-277-8800 ext. 144.
Thank you.
17 years, 3 months
FW: Decision Tables
by Hehl, Thomas
I am still stuck with this problem. Anyone with decision table experience
care to lend a hand, please?
The docs for decision tables seem to lack a great deal. I'd be happy to work
on them some, but gotta get this one working.
Thanks!
_____
From: Hehl, Thomas
Sent: Tuesday, August 28, 2007 4:10 PM
To: 'rules-users(a)lists.jboss.org'
Subject: Decision Tables
I'm having trouble figuring out the ACTION section of a decision table.
Everything else appears to be working.
My rules result in a simple True/False condition. To do this in a decision
table, I've created a class called BooleanAnswer that looks like:
public class BooleanAnswer {
private boolean answer;
/**
* no-arg constructor
*/
public BooleanAnswer(){
}
/**
* create your own default answer
* @param answer the answer to set
*/
public BooleanAnswer(boolean answer){
setAnswer(answer);
}
/**
* @return the answer
*/
public boolean isTrue() {
return answer;
}
/**
* @param answer the answer to set
*/
public void setAnswer(boolean answer) {
this.answer = answer;
}
}
Then I create a decision table with the following ACTION in it:
ACTION
answer: BooleanAnswer
answer.setAnswer($param);
Allowed
TRUE
This generates the following errors:
...
Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation error :
[Rule name=postponePart_15, agendaGroup=MAIN, salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_15_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_13, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_13_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_14, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_14_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_16, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_16_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_17, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_17_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_10, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_10_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_11, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_11_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_18, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_18_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_19, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_19_0.java (8:343)
: The field BooleanAnswer.answer is not visible
Rule Compilation error : [Rule name=postponePart_12, agendaGroup=MAIN,
salience=0, no-loop=false]
participantPostponementRules/Rule_postponePart_12_0.java (8:343)
: The field BooleanAnswer.answer is not visible
at org.drools.rule.Package.checkValidity(Package.java:408)
at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288)
at
com.acs.gs.juror.bizstrategy.PostponementStrategy.init(PostponementStrategy.
java:129)
... 14 more
)
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3T
estReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)
Help for a newbie, please?
Thanks.
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
ACS, Inc.
Government Solutions
1733 Harrodsburg Road
Lexington, KY 40504-3617
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at Thomas.Hehl(a)acs-inc.com
<mailto:Thomas.Hehl@acs-inc.com> or by telephone at 859-277-8800 ext. 144.
Thank you.
17 years, 3 months