drools rasing error while testing in maven environment but same works fine in eclispe test environment
by Kumar, Ravendra
Hi,
I have a rule that is working fine in eclipse junit4 test environment.
Running through maven test environment. It is throwing error.
the description is as below.
rule "insert LNACrossTXPONSatConfig into memory"
when
$TXP: Transponder($ULNK_CHNL_LIST: uplinkChannelConfigurations )
$ULNK_CHNL: ArrayList() from $ULNK_CHNL_LIST
then
insert( new LNACrossTXPOnSatConfig($TXP.satelliteConfigurationUUIDRef.id, $TXP.id, $ULNK_CHNL.uplinkLnaUUIDRef.id, $ULNK_CHNL.uplinkFreqConverterUUIDRef.id) );
**********************************************************************************
infrastructure:
eclipse-ide: indigo
drools lib: drools 5.2.final
eclipse plugin: drools plugin 5.2.final
jdk 6
**********************************************************************************
error:
Unable to Analyse Expression drools.insert(new LNACrossTXPOnSatConfig($TXP.satelliteConfigurationUUIDRef.id, $TXP.id,
$ULNK_CHNL.uplinkLnaUUIDRef.id, $ULNK_CHNL.uplinkFreqConverterUUIDRef.id));:
[Error: unable to resolve method using strict-mode: java.lang.Object.id()]
[Near : {... drools.insert(new LNACrossTXPO ....}]
^
[Line: 3, Column: 98] : [Rule name='insert LNACrossTXPONSatConfig into memory']
**********************************************************************************
Any help would be highly appreciated.
Thanks,
Rav
Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 10 months
Log4j in the rules?
by granz@MIT.EDU
Hi,
Is it possible to use Log4j inside the rules (RHS)?? (drl file)
Thanks,
Fabrice
14 years, 10 months
Guvnor 5.2.0 (Final) under Geronimo 2.1.4
by john@oa
Guvnor 5.2.0 (Final)
Hello
I need to get Guvnor 5.2.0 (Final) up and running under Geronimo 2.1.4
(Tomcat6 variant).
Have started looking at this and have already found that there are class
loading/conflict issues as the container utilises xstream 1.2.2 and the
Guvnor requires 1.3.1.
There are probably a whole host of other issues. Has anyone used the Guvnor
under Geronimo? Any tips on getting this working much appreciated.
Cheers
John
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-2-0-Final-under-Geronimo-2-1-4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 10 months
Working with Declared Types
by హరీష్ చౌదరి కూకట్ల
Hello EveryOne,
We are using declared types in our technical rules. But, in the then part of
the rule we want to insert these declared objects to a global list so that I
can get the output. So, is there anyway to insert these declared types into
the list.
Thanks,
Harish
14 years, 10 months
Memory leak in 5.2/5.3
by Swindells, Thomas
I'm in the middle of trying to upgrade our application to Drools 5.2 from 5.1 however I keep facing out of memory issues (I've also tried on the current 5.3 beta).
I've simplified my code into the following test case which on my machine after about 600 or so iterations gives an Out of memory exception:
@Test
public void testCase() throws InterruptedException
{
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
for(int i = 0; i < 1000; i++) {
System.out.println("Run " + i);
StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();
for(int j = 0; j < 100; j++) {
session.insert(new byte[10240]);
}
session.dispose();
session = null;
System.gc();
}
}
Am I missing anything here - I'm calling session.dispose() which is all I believe is necessary when finishing the session, however using a profiler shows that all the StatefulKnowledgeSessionImpl and ReteooStatefulSessions are still present and therefore keeping hold of all the byte arrays and memory.
Using a profiler it shows that the GC roots of the StatefulKnowledgeSessionImpl are
kruntime of org.jbpm.process.instance.ProcessRuntimeImpl
kruntime of org.jbpm.process.instance.event.DefaultSignalManager
kruntime of org.jbpm.process.instance.timer.TimerManager
kruntime of org.drools.reteoo.ReteooStatefulSession
Similarly for the ReteooStatefulSession:
session of org.drools.impl.StatefulKnowledgeSessionImpl
session of org.drools.impl.StatefulKnowledgeSessionImpl
workingMemory of org.jbpm.process.instance.ProcessRuntimeImpl
workingMemory of org.jbpm.process.instance.ProcessRuntimeImpl
workingMemory of org.jbpm.process.instance.ProcessRuntimeImpl
Is this a known issue? Am I missing anything in my code above.
I guess the alternative is to reuse my sessions - what is the most efficient way to remove all the facts from the working memory and get it back into a pristine state?
Thanks,
Thomas
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
14 years, 10 months
Problem evaluating with Enum
by Hezi Stern
I have encountered the following problem using enums in drools.
I have an enum defined called ETimeConstraint, something of the sort:
public enum ETimeConstraint {
NO_CONSTRAINT,
TODAY,
TOMORROW,
;
}
Now I wish to filter sentences which reside in the working memory based on a
time constraint which is of this enum type.
I created the following test rule
rule "My Test"
when
$sentences: ArrayList()
from collect (IPhoneSentences.Sentence(
descriptor contains ETimeConstraint
))
then
//something
end
this does not work meaning no sentence are selected although I know that
there are sentences in the working memory.
but when I add ETimeConstraint.name it does:
rule "My Test"
when
$sentences: ArrayList()
from collect (IPhoneSentences.Sentence(
descriptor contains ETimeConstraint.name
))
then
//something
end
I can stick to this workaround but it becomes very problematic to work this
way. Furthermore once I wish to define a variable for example defining
$timeConstraint :
rule "My Test"
when
$cm: Condition(
$timeConstraint:
contextIntention,
)
$sentences: ArrayList()
from collect (IPhoneSentences.Sentence(
descriptor contains $timeConstraint
))
then
//something
end
this will not work because I can't put $timeConstraint.name
any suggestions?
I am running:
- Drools 5.2.0
- Eclipse Helios
- JBoss 5.1.0
Thanks
Hezi
14 years, 10 months
Re: [rules-users] Guvnor repository database use to store assets
by puja nandamuri
Hi,
Sorry, I think the original question I had asked still seems to have been unanswered.
This is the question I had.
does Guvnor keep creating additional tables as per the need or is the Table structure that Guvnor creates in the beginning where all the assets are stored remains the same until we manually delete the Tables?
after creating rules and assets for several days, we had to re deploy a freshly compiled Guvnor war file( everything remaining the same) using the same repository xml and same database connected through jndi datasource.
In other words, just the war file has been recompiled. we also deleted the workspace and repository directories previously created by Guvnor.
The DBA had locked the userid permissions to prevent any new table creation in the Guvnor database.
During Guvnor startup, Guvnor had complained about not having permission to create Tables.
My question is :
why does Guvnor need to create any additional tables and not use the existing Table structure in the database.
I would appreciate any thoughts on this.
--- On Sun, 9/4/11, Nicolas Héron <nicolas.heron.java(a)gmail.com> wrote:
From: Nicolas Héron <nicolas.heron.java(a)gmail.com>
Subject: Re: [rules-users] Guvnor repository database use to store assets
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Date: Sunday, September 4, 2011, 10:52 PM
Hi,
Sorry, but you do not have to delete the workspace directory. Not
sure where you are getting this from? In cases where you have a
large number of packages/assets in Guvnor it is rather recommended
_not_ to delete the search indexes written onto the file system,
because it takes extra time to re-create them.
May be it is recommended. But when you modify a lot the assets, rename, copy, delete,etc.. Guvnor gets lost.
At startup, Jackrabbit (containent in Guvnor) reads all the
database and creates the two directories. You do not need to
backup them.
Again, I don't know where you are getting this from. Jackrabbit does
_not_ read the entire DB on startup and does not write any of the
JCR content stored in an RDBMS to the file system if you have
configured it to store to the RDBMS. If you for any weird reason are
seeing this on your end, you should really have another look at your
repository.xml.
The search indexes, they are stored on the file system no ? And with no index, you cannot reach any of the assets. So when you delete thoses directories, at startup, they are re-created and the database is read. I do not know what is read, but it can take quite some times, depending on the size of the package. Now If there is a way to store thoses indexes in the database, I would be happy to know how.
The project I am on has many rules and many big web decision tables that end up with more than 100000 rules. I am using 5.3 snapshot with MVEL beta6 => Startup time =5 minutes and building the package, 3 to 5 minutes on a HP G6 processor. On my PC that has an i5 processor and a 32 bits linux, I cannot build anymore the package.
With those sizes, which is not that much, Guvnor/jackrabbits gets lots on the indexes : it gives jackrabbit exceptioorn or spaces are not considered. So then, what I do is delete those two directories and restart guvnor and everything is fine again.
ThanksNicolas
-----Inline Attachment Follows-----
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 10 months
Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total
by john@oa
Guvnor: guvnor-5.2.0.Final-tomcat-6.0
Hi
I am a Drools Newbie and I have an integer field called score that I need to
add to when a rule matches in a spreadsheet decision table. i.e. the score
field should hold a running total of all scores that are matched. However,
I can't even update the field in the table. I have attached the spreadsheet
for review. In this spreadsheet I am simply trying to set the score, and
that is failing with:
DScoringTable] Rule Compilation error application cannot be resolved
My goal is to have different decision tables that will all need to update
the same score, and keep a running total of the total score.
Any help very much appreciated! I hope that I am just missing something
obvious.
http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls
demo-score-sheet.xls
In future I may wish to also update a String field and keep concatenating to
that field, is this possible?
John
--
View this message in context: http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 10 months