Druplicate rule name: 0
by bitter
I have 100 rules in xls decision table.
I modify any rule and save change. Then I try to build create new knwoledge
base using this file and I have exception:
java.lang.RuntimeException: [784,0]: Duplicate rule name: 0
[801,0]: Duplicate rule name: 0
[818,0]: Duplicate rule name: 0
[837,0]: Duplicate rule name: 0
[856,0]: Duplicate rule name: 0
[873,0]: Duplicate rule name: 0
[890,0]: Duplicate rule name: 0
[907,0]: Duplicate rule name: 0
[924,0]: Duplicate rule name: 0
[941,0]: Duplicate rule name: 0
[958,0]: Duplicate rule name: 0
[975,0]: Duplicate rule name: 0
[992,0]: Duplicate rule name: 0
[1009,0]: Duplicate rule name: 0
I tried to compile this file using SpreadSheetCompiler. This is a scrap of
drl file wth rules:
*
# rule values at A52, header at A5
rule "0"
salience 60
ruleflow-group "0"
when
*
--
View this message in context: http://drools.46999.n3.nabble.com/Druplicate-rule-name-0-tp3246425p324642...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months
encounter NullPointerException when adding ruleflow
by James Yu
Hi all,
I tried to run Drools in a webapp, it runs smoothly when I only load simple
rules.
The spec I have:
AP server --> WASCE2.1 (or geronimo 2.1)
Spring --> 3.0.5
Drools --> 5.2 Fianl
JVM --> IBM SDK 1.6
When I tried to use ruleflow --> execute drl in rf, I got
NullPointerException with the following trace:
exception
org.springframework.web.util.NestedServletException: Request processing
failed; nested exception is java.lang.NullPointerException
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
root cause
java.lang.NullPointerException
org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:516)
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:556)
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
net.viralpatel.drools.core.DroolsCore.createKnowledgeBase(DroolsCore.java:17)
net.viralpatel.contact.controller.ContactController.listContacts(ContactController.java:41)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:59)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:39)
java.lang.reflect.Method.invoke(Method.java:612)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
net.viralpatel.drools.core.DroolsCore.createKnowledgeBase(DroolsCore.java:17)
is the following line:
builder.add(ResourceFactory.newClassPathResource("basicFlow.rf"),
ResourceType.DRF);
Any advise is appreciated.
This is a UTF-8 formatted mail
-----------------------------------------------
James C.-C.Yu
14 years, 4 months
Re: [rules-users] rules-users Digest, Vol 58, Issue 17
by James Yu
>
> Are you sure that basicFlow.rf is in your classpath correctly?
>
I am sure that I have both "basicRule.drl" and "basicFlow.rf" files in
classpath as they are located in "WEB-INF\classes"
This is a UTF-8 formatted mail
-----------------------------------------------
James C.-C.Yu
14 years, 4 months
is null or is not Null failing for a String field check in Guvnor drl
by puja nandamuri
Hi ,
when using a business rule guided editor ,
for a fact, when I select a string type field from the drl guided editor in Guvnor and select
is null from the dropdown list of operators,
I get the following validation error when I do a validate on the rule.
no viable alternative at input 'null' in rule "Asset_Description_NullCheckRule"
when I do a View Source, it shows the source as
when
Asset( description == null null )
Is this a bug ?
if I select the free form drl option and create the when condition as
Asset( description == null ) , it validates fine.
Thanks,
Ram
14 years, 4 months
Rules Fest Last Minute Medical Meetup Speakers Wanted
by Mark Proctor
Rules Fest is very close (24-28th of October, San Francisco) and this
year RHT are sponsoring the bootcamps to a high level to ensure that
they are made freely available to all.
http://rulesfest.org/html/home.html
Thu the 27th will follow the normal intro format as previous years,
along with time to ask questions of core developers.
At the last minute budget was found for an additional day on Friday the
28th. Due to the success of the healthcare meet up in San Diego 2010
<http;//community.jboss.org/wiki/DroolsBootCampSanDiegoApril2010>, we
would like to try and dedicate this day to healthcare.
We would like this day to be 100% community presented, by real
practitioners. If you are doing anything interested in the area of
healthcare related to rules, workflow, events, ontologies, distributed
intelligent agents and would like to talk, please contact me asap:
mproctor at codehaus d0t org.
The talks do not need to be Drools specific, but it should be relevant
to any one looking to do Open Source based technology implementations of
the previously mentioned areas. Applied, theoritcal and technical talks
are all welcome.
Again sorry for the last minute notice, but hopefully we can still make
this into a great community oriented day.
Mark
Drools Project Lead and Co-creator
14 years, 4 months
where is drools-api jar file located for 5.2 final ?
by James Yu
Hi all,
I just downloaded and decompress "drools-distribution-5.2.0.Final", I only
find
drools-core-5.2.0.Final.jar
drools-compiler-5.2.0.Final.jar
I am unable to find "drools-api-5.2.0.Final.jar"
Does anyone know where is it located ?
This is a UTF-8 formatted mail
-----------------------------------------------
James C.-C.Yu
14 years, 4 months
Guvnor repository database use to store assets
by puja nandamuri
Hi All,
we are currently using SQLServer as the database repository for Guvnor 5.2.0.CR1
Can somone throw some light on how the database is used by Guvnor in the following scenario?
the first time we deploy Guvnor,we create an empty database and let Guvnor create the necessary Table and other structures necessary for it to save and load assets .
assuming that Guvnor creates the required structures such as Tables etc during the first deploy and may not need to create any further tables , we lock down the database from creating any further tables. Guvnor works fine for all subsequent rules creation and save.
we had to redeploy Guvnor a second time without changing anything with respect to the database.we however, had to delete the existing workspace and repository directories created on local file system to let Guvnor create them afresh.
the expectation is that Guvnor will read the assets from the existing database and create new repository and workspace directories on file system .
Guvnor threw errors saying
Caused By: java.sql.SQLException: [OWLS][SQLServer JDBC
Driver][SQLServer]CREATE TABLE permission denied in database 'GuvnorRules'.
does Guvnor create new Tables everytime we deploy a fresh instance of Guvnor to weblogic ?
or is it the way that I have generated my repository.xml that is causing Guvnor to create new tables to save non asset related data such as indexing etc?
I have attached a sample of my repository.xml for reference.
I appreciate your thoughts and feedback.
Thanks,
Ram
14 years, 4 months
How to count number of facts of a type in memory?
by puja nandamuri
Hi,
How can I count the number of facts of a partilcuar type inserted into the rules session?
lets say, I insert several instances of fact called Asset into the rules session.
I need to write a web guided decision table that outputs a specifc text value in an action column based on the number of assets in memory.
numberofAssets result
1 result12 result23 result3
How can I create a condition column that counts the number of Assets in memory ?
question2:
If I want to write a drl that needs to count number of Assets in memory and print that value, can I use a collect from or is it only used with a Collection ?
As always ,
Thank You all for your fast responses and ideas.
Thanks,
Ram
14 years, 4 months
How to deploy Fusion ?
by eskomk
Hi all,
I'm new to Drools.
We need to have Fusion features in our systems, especially temporal
relations on events.
The problem is we don't know how to take Fusion in use.
Our rules do not fire, why ?
What are the steps to get Fusion up and running ?
We are using Drools as a web service, and it is fed with xml-formed facts
through REST interface.
Drools itself works ok.
We use Guvnor as rule editor, and have its snapshot included as CHANGE_SET
resource in knowledge-services.xml, so that's not a problem.
The rules we are now interested in sits in separate .drl files which are
read as DRL resources in knowledge-services.xml
(file contents below, with BBBafterAAA.drl as a resource).
As I have understood, we must change to stateful session from stateless, to
use Fusion.
This is so that we can define the event processing mode as STREAM in
kbase-definition,
and clock-type as REALTIME in session-definition.
We are primarily using Drools version 5.1.1 on several physical and virtual
servers
(we are just learning Drools for now, primaliry gathering data to be used in
Drools).
Now I am testing Drools version 5.3.0-SNAPSHOT (drools-camel-server),
where the config file snippet below are taken.
<path> below replaces the actual package names.
We have declared some incoming facts to be events (never mind the Bean
ending):
declares_drl.drl
{file}
package org.test;
import <path>.AAABean;
import <path>.BBBBean;
declare AAABean
@role(event)
end
declare BBBBean
@role(event)
end
{/file}
File BBBafterAAA.drl contents, withot THEN part:
{file}
package org.test;
import <path>.AAABean;
import <path>.BBBBean;
/*
declare AAABean
@role(event)
end
declare BBBBean
@role(event)
end
*/
rule "BBBAfterAAA"
dialect "mvel"
no-loop true
salience 100
when
$Aaa : AAABean();
$Bbb : BBBBean(this after[10s, 10m] $Aaa);
then
// Consequences go here
{/file}
File knowledge-services.xml contents:
{file}
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:drools="http://drools.org/schema/drools-spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://drools.org/schema/drools-spring
http://drools.org/schema/drools-spring-1.3.0.xsd">
<drools:grid-node id="node1"/>
<drools:resource-change-scanner id="scanner" interval="2" />
<bean name="CCCInitBean" class="<path>.InitBean">
<property name="initOk" value="false"/>
</bean>
<drools:kbase id="kbase1" node="node1">
<drools:resources>
<drools:resource type="DRL" source="classpath:test.drl"/>
<drools:resource type="DRL"
source="classpath:declares_drl.drl"/>
<drools:resource type="DRL"
source="classpath:BBBafterAAA.drl"/>
<drools:resource type="CHANGE_SET"
source="classpath:ChangeSet.xml"/>
</drools:resources>
<drools:configuration>
<drools:event-processing-mode mode="STREAM"/>
</drools:configuration>
</drools:kbase>
<drools:kagent id="kagent1" kbase="kbase1" new-instance="false">
<drools:resources>
<drools:resource type="CHANGE_SET" source="classpath:ChangeSet.xml"/>
</drools:resources>
</drools:kagent>
<drools:ksession id="ksession1" type="stateful" kbase="kbase1"
node="node1">
<drools:configuration>
<drools:clock-type type="REALTIME"/>
</drools:configuration>
<drools:batch>
<drools:insert-object ref="mirellaInitBean"/>
<drools:fire-all-rules />
</drools:batch>
</drools:ksession>
</beans>
{/file}
Cheers,
Esko
http://www.ebsolut.fi
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-deploy-Fusion-tp3287119p3287119....
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months