Guvnor - verify that external RDBMS is being used to store rules
by Kevin Kelleher
Hi,
I configured an external RDBMS (Oracle) as the data store for Guvnor ( on
tomcat 6.0.35) - new repository.xml etc.
Thinks look good .. guvnor launched ok ... entered & validated rules etc ...
Now I want to verify that the rules are stored on the db. ( VERSIONING_*
files etc) as opposed to the default flat files under the tomcat install
dir.
Basically I'm not sure of the best way to do this. The db tables contain
blobs so wont "see" anything there!
Using Guvnor, I edited a test. This updated data in the datastore directory
(C:\apache-tomcat-6.0.35\bin\repository\repository\datastore). Is this
correct behaviour?
If the external DB is used, on tomcat startup, is a "copy" of everything
sent to bin/repository?
I deleted the repository dir under tomcat bin & restarted tomcat. I hoped
that the repository would be rebuilt from the db tables data but this did
not happen.
So can anyone advise?
thanks in advance,
Kevin
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-verify-that-external-RDBMS-is-be...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Drools : Guvnor issue on tomcat when attempting to use Oracle DB as rule store
by Kevin Kelleher
Hi,
First time post on drools ...
I installed Guvnor 5.3.0 on tomcat 6.0.35. When I used the default
(Jackrabbit) datastore all worked fine.
I next went about trying to change guvnor to use an external RDBMS (Oracle
10g) . I generated a new repository.xml . As per reference manual I used the
Repository Configuration Manager to generate a new repository.xml file.
However on startup with new repository.xml file, I get the following errors
( console, localhost & catalina).
Can anyone shed some light ?
thanks in advance,
Kevin
###### console - start ######################
17-Feb-2012 17:14:20 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performanc
e in production environments was not found on the java.library.path:
C:\Progra~2
\Java\JDK15~1.0_0\bin;.;C:\windows\system32;C:\windows;C:\oracle\product\10.2.0\
client_1\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\
System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI
Technologies\ATI.ACE
\Core-Static;C:\Progra~2\Java\JDK15~1.0_0\bin;C:\apache-ant-1.7.0\bin
17-Feb-2012 17:14:20 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
17-Feb-2012 17:14:20 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 267 ms
17-Feb-2012 17:14:20 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
17-Feb-2012 17:14:20 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
17-Feb-2012 17:14:20 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
17-Feb-2012 17:14:20 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
17-Feb-2012 17:14:20 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive guvnor.war
INFO 17-02 17:14:23,713 (RulesRepositoryConfigurator.java:getInstance:46)
Creating an instance of the RulesRepositoryConfigurator.
17-Feb-2012 17:14:24 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
17-Feb-2012 17:14:24 org.apache.catalina.core.StandardContext start
SEVERE: Context [/guvnor] startup failed due to previous errors
INFO 17-02 17:14:24,681 (LoggingHelper.java:info:49) Removing
listeners....
Removing all listeners...
Listeners removed...
INFO 17-02 17:14:24,681 (LoggingHelper.java:info:49) Shutting down
repositor
y....
INFO 17-02 17:14:24,681 (RulesRepositoryConfigurator.java:shutdown:172)
SHUTDOWN RULES CONFIG
17-Feb-2012 17:14:24 org.apache.catalina.loader.WebappClassLoader
clearReference
sThreads
SEVERE: The web application [/guvnor] appears to have started a thread named
[Ti
mer-0] but has failed to stop it. This is very likely to create a memory
leak.
17-Feb-2012 17:14:25 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
17-Feb-2012 17:14:25 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
17-Feb-2012 17:14:25 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
17-Feb-2012 17:14:25 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
17-Feb-2012 17:14:25 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
17-Feb-2012 17:14:25 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/0 config=null
17-Feb-2012 17:14:25 org.apache.catalina.startup.Catalina start
INFO: Server startup in 4457 ms
###### console - end ######################
###### localhost log -start ####################
17-Feb-2012 17:14:12 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
17-Feb-2012 17:14:12 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
17-Feb-2012 17:14:24 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.jboss.seam.servlet.SeamListener
org.jboss.seam.InstantiationException: Could not instantiate Seam component:
repositoryConfiguration
at org.jboss.seam.Component.newInstance(Component.java:2170)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at
org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:143)
at org.jboss.seam.init.Initialization.init(Initialization.java:744)
at
org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.RuntimeException: exception invoking: create
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
at org.jboss.seam.Component.callComponentMethod(Component.java:2275)
at org.jboss.seam.Component.callCreateMethod(Component.java:2198)
at org.jboss.seam.Component.newInstance(Component.java:2158)
... 29 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
at
org.drools.guvnor.server.repository.RepositoryStartupService_$$_javassist_seam_0.create(RepositoryStartupService_$$_javassist_seam_0.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
... 32 more
Caused by: java.lang.OutOfMemoryError: Java heap space
###### localhost log -start ####################
###### catalina log ##########################
17-Feb-2012 16:27:52 org.apache.catalina.session.StandardManager start
SEVERE: Exception loading sessions from persistent storage
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.drools.guvnor.server.security.rules.PackageNameTypeConverter
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at java.util.HashMap.readObject(HashMap.java:1067)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at java.util.ArrayList.readObject(ArrayList.java:591)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1509)
at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:998)
at
org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394)
at
org.apache.catalina.session.StandardManager.load(StandardManager.java:321)
at
org.apache.catalina.session.StandardManager.start(StandardManager.java:648)
at
org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:446)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4631)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.NotSerializableException:
org.drools.guvnor.server.security.rules.PackageNameTypeConverter
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.HashMap.writeObject(HashMap.java:1039)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585)
at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015)
at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:528)
at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:678)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4882)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1359)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1330)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
at org.apache.catalina.core.StandardService.stop(StandardService.java:604)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:662)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
... 6 more
17-Feb-2012 16:27:55 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
#################################################
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-issue-on-tomcat-when-atte...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Does Drools work with Set datatype?
by aitchnyu
I wanted faster (and cleaner) code for intersections and membership checks in
my Drools Planner 5.4 program, so (AFAIK) Set datatype can do it faster.
Can Drools work equally well with Set as with List datatype? I want to use
the `contains` and `memberOf` operations, but I dont care for index access
(set[n])
*Background*: I am developing a timetabling application in Drools Planner.
Each teacher has a list (set!) of periods he may teach. I want to find
intersecting periods between all teachers; so that I can create swap moves.
Drools now has to handle Set datatype instead of List.
--
View this message in context: http://drools.46999.n3.nabble.com/Does-Drools-work-with-Set-datatype-tp37...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Not possible to directly access the property
by bradypt
I'm a Drools novice but am doing a regular refactor which is causing a
problem for our existing rulebase.
Before my refactor, I had an interface Itinerary that had a getRules()
method. getRules() returned a simple POJO that had a getDestination method.
My Drools rule looked like:
rule "NZSF Accommodation - With infants" salience 101
activation-group "NZSF Accommodation"
when
itinerary : Itinerary( rules.destination memberOf
travelServicesFeatures.accommodationDestinations )
eval(isOnlineBookingAllowed(itinerary) == false)
then
TravelService travelService = addTravelService(travelServices,
TravelService.Type.ACCOMMODATION);
travelService.appendVariant(ResourceType.TEXT, "phone");
travelService.setNull(ResourceType.URL, true);
Airport destination = itinerary.getRules().getDestination();
travelService.setArguments(ResourceType.TEXT, new
ResourceRefImpl("City." + destination.getCode()));
end
All was working fine.
My refactor is simply to move Rules.getDestination() to the Itinerary
interface so I changed my rule to:
rule "NZSF Accommodation - With infants" salience 101
activation-group "NZSF Accommodation"
when
itinerary : Itinerary( destination memberOf
travelServicesFeatures.accommodationDestinations )
eval(isOnlineBookingAllowed(itinerary) == false)
then ...
Now I get:
java.lang.RuntimeException: Errors in rules: Not possible to directly access
the property 'accommodationDestinations' of declaration
'travelServicesFeatures' since it is not a pattern : [Rule name='NZSF
Accommodation - With infants']
Unable to create restriction '[QualifiedIndentifierRestr: memberOf
travelServicesFeatures.accommodationDestinations ]' for field 'destination'
in the rule 'NZSF Accommodation - With infants' : [Rule name='NZSF
Accommodation - With infants']
Any help greatly appreciated!
--
View this message in context: http://drools.46999.n3.nabble.com/Not-possible-to-directly-access-the-pro...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Drools Basic Example
by pprabhu59
Hello All,
I just followed JBPM installation steps from JBoss Org, just created a new
drools project.
When i try to run it has a java application i am getting the following
error.
Checked the forums but unable to get concrete solution.
Build groovy files option has not been set one way or the other: use
'options.put(CompilerOptions.OPTIONG_BuildGroovyFiles,
CompilerOptions.ENABLED);'
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Plugin
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.eclipse.jdt.internal.compiler.Compiler.initializeParser(Compiler.java:737)
at org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:294)
at org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:159)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:356)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:368)
at
org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:53)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:70)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:844)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:801)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:385)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:563)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:35)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:46)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 27 more
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Basic-Example-tp3759765p3759765....
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Re: [rules-users] Using an OWL Ontology in drools - advice
by Anton Hughes
>
>
> Hi Anton,
> I'm (un)officially in charge of the topic. Right now I have identified the
> following topics/tasks, feel free to ask for more details on any one of
> them:
>
> 1) Use the ontology to create a fact model to write rules with : I'm
> perfecting the tool even now, in a few days the alpha version will be
> available for testing.
> It's meant to be pretty flexible, support many persistency techniques,
> provide convenience methods and will be integrated with the recent
> "traiting" (dynamic typing) technique.
> It makes some (reasonable) assumptions on the ontology, and would need use
> cases and consolidations.
>
> 1b) Once the fact model is there, we'd have to instantiate the individuals
> in the ontology as facts
> 1c) We have a side project to make this compatible with guvnor, to edit
> "semantically constrained" rules.
>
> 2) Use the definitions in the ontology to create classification rules.
> Would
> be "rule-style", in close world assumptions. My feeling is that it would
> create an execution framework for a SPIN-like language (or, if you prefer,
> a
> DRL version of the SPIN framework).
> I haven't started it yet, but could be done in a relatively few days
>
> 3) Use the definitions in the ontology to create a rule-based,
> object-oriented semantic reasoner. A proof of concept for a fuzzy semantic
> reasoner exists, but that definitely is on the TODO list. Help, as always,
> is appreciated :)
> This would be a necessary complement to the fact model, to ensure it's kept
> consistent with the ontology.
>
>
> Hi Davide
Thanks, the work youre doing sounds really exciting and promising!
I would very much like to follow your progress, and, if I can, help out.
What is the best way to follow the progress of this project?
Kind regards,
Anton
12 years, 10 months
Re: [rules-users] Fwd: Migrating repository data from Drools 5.0 to 5.3Final
by Michael Anstis
Forwarded to drools-user
sent on the move
---------- Forwarded message ----------
From: "Michael Anstis" <michael.anstis(a)gmail.com>
Date: 17 Feb 2012 21:24
Subject: Re: [rules-users] Fwd: Migrating repository data from Drools 5.0
to 5.3Final
To: "jian zhi" <jianpzhi(a)yahoo.com>
I could not set the bound name to the same value as the Fact Type in
"master". There have been a lot of changeable for 5.4 so I assume it has
been fixed.
The other issue is a known regression affecting all asset editors. Jervis
Liu is looking into it. The workaround us to close and reopen.
sent on the move
On 17 Feb 2012 21:15, "jian zhi" <jianpzhi(a)yahoo.com> wrote:
> Sorry, the error was Unable to save this asset, as it has been recently
> updated by [xxx].
>
> ------------------------------
> *From:* jian zhi <jianpzhi(a)yahoo.com>
> *To:* Michael Anstis <michael.anstis(a)gmail.com>
> *Cc:* Rules Users List <rules-users(a)lists.jboss.org>
> *Sent:* Friday, February 17, 2012 4:08 PM
> *Subject:* Re: [rules-users] Fwd: Migrating repository data from Drools
> 5.0 to 5.3Final
>
> Thanks for the update. I wa able to set the bound name same as the fact
> type on RHS in both R5.3Final and R5.3.2 snapshort.
> I also have problem to save the decision table if I open a decision
> table(web guided editor), edit it, save it(successful), then edit it
> again(on the same table) and save it. I got "No able to save DT after make
> a change, save it, then make another change.". It happened in R5.3.2
> snapshort. Is this the new feature added? I have no problem to edit, save,
> edit again and save in R5.3Final.
>
> Thanks,
> Jian
>
> ------------------------------
> *From:* Michael Anstis <michael.anstis(a)gmail.com>
> *To:* jian zhi <jianpzhi(a)yahoo.com>
> *Cc:* Rules Users List <rules-users(a)lists.jboss.org>
> *Sent:* Friday, February 17, 2012 9:32 AM
> *Subject:* Re: [rules-users] Fwd: Migrating repository data from Drools
> 5.0 to 5.3Final
>
> I just tried setting the bound name to be the same as the Fact type in
> both the LHS and RHS with "master" and it is not allowed.
>
> It sounds like your export has issues introduced as a result of bugs in
> 5.0.x. This is over 2 years old and you're unlikely to find much community
> support now.
>
> I believe the workaround you have identified is the only course of action.
>
> With kind regards,
>
> Mike
>
> On 16 February 2012 18:59, jian zhi <jianpzhi(a)yahoo.com> wrote:
>
> Mike,
>
> Thanks a lot for the response. There are some confusions. Although I had
> the bound name same as the fact type in 5.0.1 I still got fact0 in the rule
> source, which in the code you showed me it should not happen.
>
> There is a bug reported in Jira
> https://issues.jboss.org/browse/JBRULES-2843. The workaround was
> provided, however manually fixing the problem for each decision table is
> not an good option if we have a lot of decision tables. I guess the
> workaround for us is to remove the bound name from the exported repository
> before I import it back to 5.3.
>
> The linked issue (https://issues.jboss.org/browse/GUVNOR-171, Don't allow
> that 'Fact Name' has the same name as the 'Fact Type' or an empty value)
> indicated that the feature was added in drools-5.0.0CR1, however in 5.0.1 I
> still entered the fact name same as the fact type. The repository I sent
> you was created by 5.0.1. Also the new feature only exists in LHS in 5.3.
> On the RHS you still can enter the bound name same as the fact type.
>
> Again, thanks a lot for your help,
> Jian
> ------------------------------
> *From:* Michael Anstis <michael.anstis(a)gmail.com>
> *To:* jian zhi <jianpzhi(a)yahoo.com>
> *Sent:* Thursday, February 16, 2012 3:22 AM
>
> *Subject:* Re: [rules-users] Fwd: Migrating repository data from Drools
> 5.0 to 5.3Final
>
> This issue is not related to the migration from 5.0 to 5.3.
>
> The repository export XML contains the following:-
>
> <actionCols>
> <insert-fact-column>
> <width>-1</width>
> <hideColumn>false</hideColumn>
> <header>SetEligible</header>
> <factType>RuleEligibilityResult</factType>
> * <boundName>RuleEligibilityResult</boundName>*
> <factField>eligible</factField>
> <type>Boolean</type>
> <valueList>,true,false</valueList>
> </insert-fact-column>
> </actionCols>
>
> The name of the bound fact is "RuleEligibilityResult" which is what you
> are seeing in 5.3.
>
> Furthermore the code in BRDRLPersistence (that creates the DRL) remains
> the same in both 5.0 and 5.3:-
>
> if (action.getBoundName()==null) {
> generateSetMethodCalls("fact" + idx, action.fieldValues);
> } else {
> generateSetMethodCalls(action.getBoundName(), action.fieldValues);
> }
>
> "fact0" would only be created if the column does not have a bound name
> which is not the case in the repository export you provide.
>
> With kind regards,
>
> Mike
>
> On 15 February 2012 22:00, jian zhi <jianpzhi(a)yahoo.com> wrote:
>
> The repository is attached. The sources are listed below. On RHS the fact
> name was fact0 in 5.0, however it's RuleEligibilityResult(the fact name is
> same as the fact type) in 5.3.
>
> Source in Drools 5.0:
> then
> RuleEligibilityResult fact0 = new RuleEligibilityResult();
> fact0.setEligible( true );
> insert(fact0 );
> end
>
> Source in Drools 5.3
> then 9. | RuleEligibilityResult RuleEligibilityResult = new
> RuleEligibilityResult(); 10. | RuleEligibilityResult.setEligible(
> true ); 11. | insert(RuleEligibilityResult ); 12. | end
>
> Thanks,
> Jian
>
> ------------------------------
> *From:* Michael Anstis <michael.anstis(a)gmail.com>
> *To:* jian zhi <jianpzhi(a)yahoo.com>
> *Sent:* Tuesday, February 14, 2012 3:49 PM
>
> *Subject:* Re: [rules-users] Fwd: Migrating repository data from Drools
> 5.0 to 5.3Final
>
> Can you give some more information?
>
> This doesn't sound like it relates to the decision table but Drools
> Expert's handling of declared fact types.
>
> Can you provide another repository export demonstrating the problem?
>
> On 14 February 2012 20:27, jian zhi <jianpzhi(a)yahoo.com> wrote:
>
> As long as the result of the evaluation is same we are fine with it.
>
> One more question regarding to the data migration. In Drools 5.0 there is
> no restriction between the fact type and name so the fact name could be
> same as the fact type. After we migrated the data to 5.3 we got the IllegalArgumentException:
> object is not an instance of declaring class. Is it possible to fix the
> problem by converting the fact name to the 'Fact Type' with first character
> in lowercase during importing so the data is backward compatible?
>
> Thanks a lot,
> Jian
>
> ------------------------------
> *From:* Michael Anstis <michael.anstis(a)gmail.com>
> *To:* jian zhi <jianpzhi(a)yahoo.com>; Rules Users List <
> rules-users(a)lists.jboss.org>
> *Sent:* Monday, February 13, 2012 3:53 PM
> *Subject:* Re: [rules-users] Fwd: Migrating repository data from Drools
> 5.0 to 5.3Final
>
> This is fine.
>
> 5.2 onwards groups columns for the same pattern together - if you looked
> at the DRL fo 5.0 you'd have seen the columns are effectively grouped
> together too.
>
> For example; given the following 5.0 configuration (taken from what you
> describe you have done):-
>
> Pattern $a : Column A - Condition 1
> Pattern $b : Column B - Condition 1
> Pattern $c : Column C - Condition 1
> Pattern $d : Column D - Condition 1
> Pattern $a : Column E - Condition 2
> Pattern $b : Column F - Condition 2
>
> 5.0 DRL
>
> $a : Pattern( Condition 1, Condition 2 )
> $b : Pattern( Condition 1, Condition 2 )
> $c : Pattern( Condition 1 )
> $d : Pattern( Condition 1 )
>
> Importing this into 5.3 groups the columns:-
>
> Pattern $a : Column A - Condition 1
> Pattern $a : Column B - Condition 2
> Pattern $b : Column C - Condition 1
> Pattern $b : Column D - Condition 2
> Pattern $c : Column E - Condition 1
> Pattern $d : Column F - Condition 1
>
> 5.2 DRL
>
> $a : Pattern( Condition 1, Condition 2 )
> $b : Pattern( Condition 1, Condition 2 )
> $c : Pattern( Condition 1 )
> $d : Pattern( Condition 1 )
>
> Furthermore, at the request of the community, the behavior of "default
> values" changed so that the are only the default value for a new row (5.2
> onwards) and not the value used for an empty cell (5.0). I know this has
> caused some re-work for people migrating a legacy decision table from 5.0
> to 5.2 but since the impact, to date, has been small I do not plan on
> making any programmatic changes.
>
> With kind regards,
>
> Mike
>
> 2012/2/13 jian zhi <jianpzhi(a)yahoo.com>
>
> Mike,
>
> Thanks for the detail explanation.
>
> I found that the order of the conditions were changed again after I added
> two more conditions to the same package I used last time.
> I added default value to the first two conditions. Added the fifth
> condition by using the binding name created for the first condition.Add the
> sixth condition by using the binding name created for the second condition.
> After I import the data to 5.3 the fifth condition became the second and
> the sixth condition became the fourth. Also the default value for the first
> and second conditions are not listed in the rule source in 5.3. Could you
> please take a look? I attach the modified repository in the email.
>
> Thanks a lot,
> Jian
>
> ------------------------------
> *From:* Michael Anstis <michael.anstis(a)gmail.com>
> *To:* drools-user <rules-users(a)lists.jboss.org>
> *Sent:* Friday, February 10, 2012 12:59 PM
> *Subject:* [rules-users] Fwd: Migrating repository data from Drools 5.0
> to 5.3Final
>
> I suspect ConsumerAccountAssociationFact.hasAnyAccountClosed is a boolean.
>
> In 5.3 we handle data-types better than 5.0, so String, Numbers, Dates are
> Booleans have editors appropriate for the data-type and the resulting DRL
> only escapes values with quotation marks where needed (i.e. Strings and
> Dates). Boolean's in the table are now shown as Checkboxes. If the value is
> "true" it is ticked, if the value is "false" the checkbox is not ticked.
>
> I don't therefore believe there is any problem.
>
> On 10 February 2012 16:35, jian zhi <jianpzhi(a)yahoo.com> wrote:
>
> Mike,
>
> Thanks for the quick response. I downloaded the war and tested the fix.
> The order of the conditions are correct now. There is still a small problem
> in the last condition.
>
> In Drools 5.0 the source is consumerAccount :
> ConsumerAccountAssociationFact( hasAnyAccountClosed == "false" ).
> In Drools 5.3 the source is consumerAccount :
> ConsumerAccountAssociationFact( hasAnyAccountClosed == false ). It displays
> a square check box in the cell.
>
> Could you please take a look?
> Thanks,
> Jian
>
> ------------------------------
> *From:* Michael Anstis <michael.anstis(a)gmail.com>
> *To:* jian zhi <jianpzhi(a)yahoo.com>; Rules Users List <
> rules-users(a)lists.jboss.org>
> *Sent:* Thursday, February 9, 2012 4:55 AM
>
> *Subject:* Re: [rules-users] Migrating repository data from Drools 5.0 to
> 5.3Final
>
> You can get a build containing the fix from Nexus:
>
>
> https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.drools...
>
> 2012/2/8 jian zhi <jianpzhi(a)yahoo.com>
>
> Mike,
>
> Is it possible to release a patch of 5.3?
>
> Thanks,
> Jian
>
> ------------------------------
> *From:* Michael Anstis <michael.anstis(a)gmail.com>
> *To:* Rules Users List <rules-users(a)lists.jboss.org>
> *Sent:* Wednesday, February 8, 2012 3:17 AM
>
> *Subject:* Re: [rules-users] Migrating repository data from Drools 5.0 to
> 5.3Final
>
> The problem has existed since 5.2 and would potentially affect loading any
> earlier version.
> Prior to 5.2 the object model used by the guided decision table did not
> hold a Pattern to which individual condition columns are bound.
> The conversion code groups individual condition columns into the
> appropriate group and moves the underlying column data accordingly (as
> there was no guarantee columns with the same bound name were consecutive).
> There was a problem with the creation and insertion of the new Pattern
> objects that relied upon the order of entries in a HashMap being
> consistent. This has now changed.
> I know others have been using the new guided decision table with old
> repositories without problem and our unit tests did not detect the problem
> either.
> AFAIK this is the first report of any such issue since the release of
> 5.2's betas, however I would be wrong to say there is no risk.
> sent on the move
> On 8 Feb 2012 01:22, "vadlam" <sreeram.vadlamudi(a)wellsfargo.com> wrote:
>
> does this issue happen for any previous version of Guvnor data such as 5.0
> or 5.1 or 5.2 exported and imported into a Guvnor 5.3 repository ?
>
> does this mean, we cannot rely on 5.3.0 version of Guvnor code when
> migrating data from a previous version and should rather apply the fix ?
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-Migrating-repository-data-f...
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
>
>
>
>
>
>
> _______________________________________________
> 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
>
>
>
12 years, 10 months
Re: [rules-users] Fwd: Migrating repository data from Drools 5.0 to 5.3Final
by jian zhi
Mike,
Thanks a lot for the response. There are some confusions. Although I had the bound name same as the fact type in 5.0.1 I still got fact0 in the rule source, which in the code you showed me it should not happen.
There is a bug reported in Jira https://issues.jboss.org/browse/JBRULES-2843. The workaround was provided, however manually fixing the problem for each decision table is not an good option if we have a lot of decision tables. I guess the workaround for us is to remove the bound name from the exported repository before I import it back to 5.3.
The linked issue (https://issues.jboss.org/browse/GUVNOR-171,Don't allow that 'Fact Name' has the same name as the 'Fact
Type' or an empty value) indicated that the feature was added in drools-5.0.0CR1, however in 5.0.1 I still entered the fact name same as the fact type. The repository I sent you was created by 5.0.1. Also the new feature only exists in LHS in 5.3. On the RHS you still can enter the bound name same as the fact type.
Again, thanks a lot for your help,
Jian
________________________________
From: Michael Anstis <michael.anstis(a)gmail.com>
To: jian zhi <jianpzhi(a)yahoo.com>
Sent: Thursday, February 16, 2012 3:22 AM
Subject: Re: [rules-users] Fwd: Migrating repository data from Drools 5.0 to 5.3Final
This issue is not related to the migration from 5.0 to 5.3.
The repository export XML contains the following:-
<actionCols>
<insert-fact-column>
<width>-1</width>
<hideColumn>false</hideColumn>
<header>SetEligible</header>
<factType>RuleEligibilityResult</factType>
<boundName>RuleEligibilityResult</boundName>
<factField>eligible</factField>
<type>Boolean</type>
<valueList>,true,false</valueList>
</insert-fact-column>
</actionCols>
The name of the bound fact is "RuleEligibilityResult" which is what you are seeing in 5.3.
Furthermore the code in BRDRLPersistence (that creates the DRL) remains the same in both 5.0 and 5.3:-
if (action.getBoundName()==null) {
generateSetMethodCalls("fact" + idx, action.fieldValues);
} else {
generateSetMethodCalls(action.getBoundName(), action.fieldValues);
}
"fact0" would only be created if the column does not have a bound name which is not the case in the repository export you provide.
With kind regards,
Mike
On 15 February 2012 22:00, jian zhi <jianpzhi(a)yahoo.com> wrote:
The repository is attached. The sources are listed below. On RHS the fact
name was fact0 in 5.0, however it's RuleEligibilityResult(the fact name
is same as the fact type) in 5.3.
>
>
>Source in Drools 5.0:
> then
> RuleEligibilityResult fact0 = new RuleEligibilityResult();
> fact0.setEligible( true );
> insert(fact0 );
>end
>
>
>Source in Drools 5.3
> then
>9. | RuleEligibilityResult RuleEligibilityResult = new
RuleEligibilityResult();
>10. | RuleEligibilityResult.setEligible( true );
>11. | insert(RuleEligibilityResult );
>12. | end
>
>
>Thanks,
>Jian
>
>
>
>________________________________
> From: Michael Anstis <michael.anstis(a)gmail.com>
>To: jian zhi <jianpzhi(a)yahoo.com>
>Sent: Tuesday, February 14, 2012 3:49 PM
>
>Subject: Re: [rules-users] Fwd: Migrating repository data from Drools 5.0 to 5.3Final
>
>
>
>Can you give some more information?
>
>This doesn't sound like it relates to the decision table but Drools Expert's handling of declared fact types.
>
>Can you provide another repository export demonstrating the problem?
>
>
>On 14 February 2012 20:27, jian zhi <jianpzhi(a)yahoo.com> wrote:
>
>As long as the result of the evaluationis same we are fine with it.
>>
>>
>>One more question regarding to the data migration. In Drools 5.0 there is no restriction between the fact type and name so the fact name could be same as the fact type. After we migrated the data to 5.3 we got the IllegalArgumentException: object is not an instance of declaring class. Is it possible to fix the problem by converting the fact name to the 'Fact Type' with first character in lowercase during importing so the data is backward compatible?
>>
>>
>>Thanks a lot,
>>Jian
>>
>>
>>
>>
>>________________________________
>> From: Michael Anstis <michael.anstis(a)gmail.com>
>>To: jian zhi <jianpzhi(a)yahoo.com>; Rules Users List <rules-users(a)lists.jboss.org>
>>Sent: Monday, February 13, 2012 3:53 PM
>>Subject: Re: [rules-users] Fwd: Migrating repository data from Drools 5.0 to 5.3Final
>>
>>
>>
>>This is fine.
>>
>>5.2 onwards groups columns for the same pattern together - if you looked at the DRL fo 5.0 you'd have seen the columns are effectively grouped together too.
>>
>>For example; given the following 5.0 configuration (taken from what you describe you have done):-
>>
>>Pattern $a : Column A - Condition 1
>>Pattern $b : Column B - Condition 1
>>Pattern $c : Column C - Condition 1
>>Pattern $d : Column D - Condition 1
>>Pattern $a : Column E - Condition 2
>>Pattern $b : Column F - Condition 2
>>
>>5.0 DRL
>>
>>$a : Pattern( Condition 1, Condition 2 )
>>$b : Pattern( Condition 1, Condition 2 )
>>$c : Pattern( Condition 1 )
>>$d : Pattern( Condition 1 )
>>
>>Importing this into 5.3 groups the columns:-
>>
>>Pattern $a : Column A - Condition 1
>>Pattern $a : Column B - Condition 2
>>Pattern $b : Column C - Condition 1
>>Pattern $b : Column D - Condition 2
>>Pattern $c : Column E - Condition 1
>>Pattern $d : Column F - Condition 1
>>
>>5.2 DRL
>>
>>$a : Pattern( Condition 1, Condition 2 )
>>$b : Pattern( Condition 1, Condition 2 )
>>$c : Pattern( Condition 1 )
>>$d : Pattern( Condition 1 )
>>
>>Furthermore, at the request of the community, the behavior of "default values" changed so that the are only the default value for a new row (5.2 onwards) and not the value used for an empty cell (5.0). I know this has caused some re-work for people migrating a legacy decision table from 5.0 to 5.2 but since the impact, to date, has been small I do not plan on making any programmatic changes.
>>
>>With kind regards,
>>
>>Mike
>>
>>
>>2012/2/13 jian zhi <jianpzhi(a)yahoo.com>
>>
>>Mike,
>>>
>>>
>>>
>>>Thanks for the detail explanation.
>>>
>>>
>>>
>>>I found that the order of the conditions were changed again after I added two more conditions to the same package I used last time.
>>>I added default value to the first two conditions. Added the fifth condition by using the binding name created for the first condition.Add the sixth condition by using the binding name created for the second condition. After I import the data to 5.3 the fifth condition became the second and the sixth
condition became the fourth. Also the default value for the first and second conditions are not listed in the rule source in 5.3. Could you please take a look? I attach the modified repository in the email.
>>>
>>>
>>>Thanks a lot,
>>>Jian
>>>
>>>
>>>
>>>________________________________
>>> From: Michael Anstis <michael.anstis(a)gmail.com>
>>>To: drools-user <rules-users(a)lists.jboss.org>
>>>Sent: Friday, February 10, 2012 12:59 PM
>>>Subject: [rules-users] Fwd: Migrating repository data from Drools 5.0 to 5.3Final
>>>
>>>
>>>
>>>I suspect ConsumerAccountAssociationFact.hasAnyAccountClosed is a boolean.
>>>
>>>
>>>In 5.3 we handle data-types better than 5.0, so String, Numbers, Dates are Booleans have editors appropriate for the data-type and the resulting DRL only escapes values with quotation marks where needed (i.e. Strings and Dates). Boolean's in the table are now shown as Checkboxes. If the value is "true" it is ticked, if the value is "false" the checkbox is not ticked.
>>>
>>>I don't therefore believe there is any problem.
>>>
>>>
>>>
>>>On 10 February 2012 16:35, jian zhi <jianpzhi(a)yahoo.com> wrote:
>>>
>>>Mike,
>>>>
>>>>
>>>>
>>>>Thanks for the quick response. I downloaded the war and tested the fix. The order of the conditions are correct now. There is still a small problem in the last condition.
>>>>
>>>>
>>>>In Drools 5.0 the source is consumerAccount : ConsumerAccountAssociationFact( hasAnyAccountClosed == "false" ).
>>>>In Drools 5.3 the source is consumerAccount : ConsumerAccountAssociationFact( hasAnyAccountClosed == false ). It displays a square check box in the cell.
>>>>
>>>>
>>>>Could you please take a look?
>>>>Thanks,
>>>>Jian
>>>>
>>>>
>>>>
>>>>
>>>>________________________________
>>>> From: Michael Anstis <michael.anstis(a)gmail.com>
>>>>To: jian zhi <jianpzhi(a)yahoo.com>; Rules Users List <rules-users(a)lists.jboss.org>
>>>>Sent: Thursday, February 9, 2012 4:55 AM
>>>>
>>>>Subject: Re: [rules-users] Migrating repository data from Drools 5.0 to 5.3Final
>>>>
>>>>
>>>>
>>>>You can get a build containing the fix from Nexus:
>>>>
>>>>https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.drools...
>>>>
>>>>
>>>>2012/2/8 jian zhi <jianpzhi(a)yahoo.com>
>>>>
>>>>Mike,
>>>>>
>>>>>
>>>>>Is it possible to release a patch of 5.3?
>>>>>
>>>>>
>>>>>Thanks,
>>>>>Jian
>>>>>
>>>>>
>>>>>
>>>>>________________________________
>>>>> From: Michael Anstis <michael.anstis(a)gmail.com>
>>>>>To: Rules Users List <rules-users(a)lists.jboss.org>
>>>>>Sent: Wednesday, February 8, 2012 3:17 AM
>>>>>
>>>>>Subject: Re: [rules-users] Migrating repository data from Drools 5.0 to 5.3Final
>>>>>
>>>>>
>>>>>
>>>>>The problem has existed since 5.2 and would potentially affect loading any earlier version.
>>>>>Prior to 5.2 the object model used by the guided decision table did not hold a Pattern to which individual condition columns are bound.
>>>>>The conversion code groups individual condition columns into the appropriate group and moves the underlying column data accordingly (as there was no guarantee columns with the same bound name were consecutive).
>>>>>There was a problem with the creation and insertion of the new Pattern objects that relied upon the order of entries in a HashMap being consistent. This has now changed.
>>>>>I know others have been using the new guided decision table with old repositories without problem and our unit tests did not detect the problem either.
>>>>>AFAIK this is the first report of any such issue since the release of 5.2's betas, however I would be wrong to say there is no risk.
>>>>>sent on the move
>>>>>On 8 Feb 2012 01:22, "vadlam" <sreeram.vadlamudi(a)wellsfargo.com> wrote:
>>>>>
>>>>>does this issue happen for any previous version of Guvnor data such as 5.0
>>>>>>or 5.1 or 5.2 exported and imported into a Guvnor 5.3 repository ?
>>>>>>
>>>>>>does this mean, we cannot rely on 5.3.0 version of Guvnor code when
>>>>>>migrating data from a previous version and should rather apply the fix ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>--
>>>>>>View this message in context: http://drools.46999.n3.nabble.com/rules-users-Migrating-repository-data-f...
>>>>>>Sent from the Drools: User forum mailing list archive at Nabble.com.
>>>>>>_______________________________________________
>>>>>>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
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>_______________________________________________
>>>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
>>>
>>>
>>
>>
>>
>
>
>
12 years, 10 months
Rule definition introspection
by GPatel@tsys.com
Is it possible to self-introspect the rule definition?
For example:
when
$redCar : Car(color == 'red')
then
System.out.println("a red car exists");
Is it possible to know that the above rule uses the Car fact and the
Car.color attribute?
Thanks
G. Patel
-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you
12 years, 10 months