Task Server as Jboss Service
by Cristiano Nicolai
Hi guys,
I think that would be great if we could deploy the TaskServer
(MinaTaskServer) as a JbossMC bean, making possible to administer it using
admin-console.
There's any work in this way or other plans to deploy this component?
Thanks.
--
Best regards,
Cristiano Nicolai
13 years, 11 months
Repackaging of the jar: missing drools.rulebase.conf?
by drdaveg
I had several Eclipse projects with customized WorkItem's in 5.1. The latest
download of the source code seems to have been reorganized: I see
drools.rulebase.conf files that seem unrelated to drools.workDefinitions and
all the versions that look like what I would expect are in the example files
and their jars; have the drools-process jar's been repackaged without
drools.rulebase.conf or might this file have been deprecated?
What I had been expecting was to find an entry like:
drools.workDefinitions = WorkDefinitions.conf
in the file with a corresponding WorkDefinitions.conf file for the email and
log WorkItem's. Thanks!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Repackaging-of-the-ja...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 11 months
Re: [rules-users] Rules in App Server Error
by Greg Barton
My, aren't we snippy?
OK, well if you read this then note that those rules shouldn't work in any environment for the reason previously stated. (Use of an undeclared variable in the RHS.) If they are working then something odd is going on, and since you say they are then...something odd is going on.
BTW, the error you're getting now is an mvel error:
http://mvel.codehaus.org/Strong+Typing+Mode
Since you're currently getting it for "$severity" and not just "severity" even though the former does not currently appear in your rule...well that's the odd bit I mentioned before. Somewhere $severity (along with $weight, $factor, and $tempScore) is being declared, but it's not in the text of the rule as you've provided it.
GreG
On Dec 3, 2010, at 19:07, "John McKim" <jmckim(a)comcast.net> wrote:
First off, yes, I am an expert Java programmer, not just a Drools expert - yet. If you took the time to read the post, you would have found that the answer that was provided to me “DIDN’T WORK”. Never mind, I’ll figure it out myself. Goodby! From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Greg Barton
Sent: Friday, December 03, 2010 7:26 PM
To: Rules Users List
Subject: Re: [rules-users] Rules in App Server Error You made the same error in three other places. Fix them. Are you familiar with the java language?
GreG
On Dec 3, 2010, at 15:15, "John McKim" <jmckim(a)comcast.net> wrote:Thanks for the reply Mauricio. I tried what you said using this modified rule: rule "medicalHistoryBleedingRiskFactors.gastritis rule"salience 20 when # find patients who indicated that they have MedicalHistoryBleedingRiskFactors: gastritis $patient : Patient(medicalHistoryBleedingRiskFactors.gastritis > 0) then String severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; # Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String("MedicalHistoryBleedingRiskFactors.gastritis");end But I got this exception in the client (I
am using 5.1.1 by the way): Exception in thread "Thread-4" java.lang.RuntimeException: Unable to build expression for 'consequence': [Error: Failed to compile: 1 compilation error(s): - (1,9) unqualified type in strict mode for: $severity][Near : {... Unknown ....}] ^[Line: 1, Column: 0] ' String severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; // Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String("MedicalHistoryBleedingRiskFactors.gastritis");' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule'] at
com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin.createLevel1KnowledgeBase(LocalRuleEnginePlugin.java:107) at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin.access$100(LocalRuleEnginePlugin.java:22) at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin$InitializeRuleEngine.run(LocalRuleEnginePlugin.java:192) When I took out the String severity and used just $severity: it works fine. Just on the App server does it fail. From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Friday, December 03, 2010 3:36 PM
To: Rules Users List
Subject: Re: [rules-users] Rules in App Server Error that's weird.. you are using a varible that you never define in the Right Hand Side.
$severity was never defined. In the RHS remember that you can write pure java. So if you want a variable called severity you should declare it as:
String severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; Greetings. 2010/12/3 John McKim <jmckim(a)comcast.net>I'm having a problem that I can't seem to figure out. I have rules that run in a client program with no problem - about 125 rules in all. When I try to run these same rules in an App Server (GlassFish) I get several rules (about 5) that have an error on initialization. Here is the error message followed by the rule.
*******************************************
SEVERE: java.lang.RuntimeException: Unable to build expression for 'consequence': [Error: not a statement, or badly formed structure]
[Near : {... $severity;
....}]
^
[Line: 1, Column: 233] ' $severity = $patient.medicalHistoryBleedingRiskFactors.gastritis;
$weight = 5;
$factor = .1;
$tempScore = $factor;
$tempScore = $tempScore * $weight;
$tempScore = $tempScore * $severity;
// Now add this risk score to the accumlated risk score
$patient.score = $patient.score + $tempScore;
$patient.problem = new String("MedicalHistoryBleedingRiskFactors.gastritis");
' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule']
**********************************************
rule "medicalHistoryBleedingRiskFactors.gastritis rule"
salience 20
when
# find patients who indicated that they have MedicalHistoryBleedingRiskFactors: gastritis
$patient : Patient(medicalHistoryBleedingRiskFactors.gastritis > 0)
then
$severity = $patient.medicalHistoryBleedingRiskFactors.gastritis;
$weight = 5;
$factor = .1;
$tempScore = $factor;
$tempScore = $tempScore * $weight;
$tempScore = $tempScore * $severity;
# Now add this risk score to the accumlated risk score
$patient.score = $patient.score + $tempScore;
$patient.problem = new String("MedicalHistoryBleedingRiskFactors.gastritis");
end As I said, this rule runs fine in a client app – when I run the same rules in app server I get an error. This is only happening in 5 out of 125 rules, and only during initialization using builder.add(ResourceFactory.newClassPathResource(file).
Thanks.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -_______________________________________________
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
13 years, 12 months
KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
by John Peterson
I'm getting the following error when I attempt to run my Drools
application. I recently upgraded from Drools 5.0.1 and Guvnor 5.0.1 to
5.1.1 (for both). I've looked through the rules-users list and I found
the issue with the XML Change Set (authentication), which I've addressed
(XML listed at the bottom), but I'm still getting the error. Does
anyone have any ideas or can point me in a particular direction?
Thanks
Error:
[2010:12:337 09:12:373:debug] KnowledgeAgent mapping
resource=[ClassPathResource path='ruleflow.rf'] to
KnowledgeDefinition=org.drools.ruleflow.core.RuleFlowProcess@2d89ba2a
[2010:12:337 09:12:373:exception]
java.lang.RuntimeException: KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(Kno
wledgeAgentImpl.java:914)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgent
Impl.java:704)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAge
ntImpl.java:584)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentIm
pl.java:185)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentIm
pl.java:168)
at
com.agencyawards2.RuleSessionProviderFactory.getSessionFactory(RuleSessi
onProviderFactory.java:102)
at
com.agencyawards2.RuleSessionProviderFactory.getProvider(RuleSessionProv
iderFactory.java:30)
at com.agencyawards2.RunRules.runRules(RunRules.java:25)
at com.agencyawards2.DroolsTest.main(DroolsTest.java:36)
Caused by: java.lang.NullPointerException
at
org.drools.process.core.impl.ProcessImpl.equals(ProcessImpl.java:134)
at java.util.HashMap.put(Unknown Source)
at java.util.HashSet.add(Unknown Source)
at
org.drools.agent.impl.KnowledgeAgentImpl$RegisteredResourceMap.putDefini
tion(KnowledgeAgentImpl.java:1150)
at
org.drools.agent.impl.KnowledgeAgentImpl.addDefinitionMapping(KnowledgeA
gentImpl.java:1037)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildResourceMapping(KnowledgeA
gentImpl.java:496)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildResourceMapping(KnowledgeA
gentImpl.java:443)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(Kno
wledgeAgentImpl.java:912)
... 8 more
Change Set:
<?xml version="1.0" encoding="UTF-8" ?>
- <change-set xmlns="http://drools.org/drools-5.0/change-set"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/change-set
drools-change-set-5.0.xsd">
- <add>
<resource
source="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/pac
kage/com.agencyawards2/LATEST" type="PKG" basicAuthentication="enabled"
username="admin" password="admin" />
</add>
</change-set>
13 years, 12 months
Rules in App Server Error
by John McKim
I'm having a problem that I can't seem to figure out. I have rules that run
in a client program with no problem - about 125 rules in all. When I try to
run these same rules in an App Server (GlassFish) I get several rules (about
5) that have an error on initialization. Here is the error message followed
by the rule.
*******************************************
SEVERE: java.lang.RuntimeException: Unable to build expression for
'consequence': [Error: not a statement, or badly formed structure]
[Near : {... $severity;
....}]
^
[Line: 1, Column: 233] ' $severity =
$patient.medicalHistoryBleedingRiskFactors.gastritis;
$weight = 5;
$factor = .1;
$tempScore = $factor;
$tempScore = $tempScore * $weight;
$tempScore = $tempScore * $severity;
// Now add this risk score to the accumlated risk score
$patient.score = $patient.score + $tempScore;
$patient.problem = new
String("MedicalHistoryBleedingRiskFactors.gastritis");
' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule']
**********************************************
rule "medicalHistoryBleedingRiskFactors.gastritis rule"
salience 20
when
# find patients who indicated that they have
MedicalHistoryBleedingRiskFactors: gastritis
$patient : Patient(medicalHistoryBleedingRiskFactors.gastritis > 0)
then
$severity = $patient.medicalHistoryBleedingRiskFactors.gastritis;
$weight = 5;
$factor = .1;
$tempScore = $factor;
$tempScore = $tempScore * $weight;
$tempScore = $tempScore * $severity;
# Now add this risk score to the accumlated risk score
$patient.score = $patient.score + $tempScore;
$patient.problem = new
String("MedicalHistoryBleedingRiskFactors.gastritis");
end
As I said, this rule runs fine in a client app - when I run the same rules
in app server I get an error. This is only happening in 5 out of 125 rules,
and only during initialization using
builder.add(ResourceFactory.newClassPathResource(file).
Thanks.
13 years, 12 months
scoping spring beans
by Kumar, Ravendra
Hello,
I wonder, if some spring drools expert guy help me to set the
ksession bean's bean scope like below.
<drools:ksession kbase="kbase1" type="stateless" id="stateless" >
<property scope="prototype"/>
</drools:ksession>
Any help will be highly appriciated
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.
13 years, 12 months
Using Guvnor fact models for Eclipse rule editing
by flo
Title says almost all, if I check out my already created Models, Rules and
Enumerations from Guvnor to an Eclipse Project, I can edit them all, but
Eclipse's guided business rule editor doesn't seem to recognize my Fact
Model drls which are located in the same folder.
Strangely, the enums are recognized correctly and can be used in the guided
editor...But if I try to add a fact to the LHS (or a fact property) for
example, the resulting list to choose from has no entires beside the
standard "...".
I've already tried a variety of "import" statements in the autocreated
"drools.package" file, but this didn't seem to make any change. Do I need to
make any settings on the project, or do the namespaces between guvnor and
eclipse have to match or something like that?
As a short explanation what I'm actually trying to achieve - I have a Guvnor
repository, which is used in conjunction with drools-server and a .NET
client (no Java application anywhere!). This repository already contains my
Fact Model as DRLs, and also some enums and some rules. For authoring
additional rules, I don't want to use the Guvnor web interface but eclipse
because of its far better usability when handling lots of rules...now this
obviously doesn't work without Eclipse recognizing my fact model.
Thanks for any advice on this!
Best,
phlo
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-Guvnor-fact-mod...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 12 months
"==" not work for big int value
by Zeke
Hi,
I'm using Drools 4.0.7. I find "==" operator does not work for big int
value (like 2147483647). The condition is like "sec.fir.i == 2147483647". I
attach my test code. With my simple testing, it seems that it does not work
for comparsion with int constant from 1000000001 to 2147483647. Is it a bug
of drools? I have already tested long and BigInteger do not have this kind
of problem.
Thanks!
13 years, 12 months
Bay Area meetup
by Antoine Toulme
If you are in the SF Bay Area, Intalio would like to invite you to a meetup on Thursday January 13th at Intalio HQ.
We want to build a Drools community in the bay, and we would like to introduce what Intalio is doing with Drools there.
We're interested into getting to know the Drools users some more as well.
Our address is:
644 Emerson St
Suite 200
Palo Alto
We're next to Gordon Biersch, up the stairs.
Please register using Eventbrite here:
http://intaliodrools.eventbrite.com/
Thanks,
Antoine
13 years, 12 months