Insert new facts in WorkingMemory event handler
by Bruno Freudensprung
Hi everyone,
Do you know if it is possible to insert/modify/retract facts in a
working memory event handler?
Here is my use case actually: I want my users to be able to write rules
like "When ... Then retract X" without having to bother with the
consequences of retracting X on the other objects of the sessions (some
of them might be retracted as well). These consequences can be expressed
by rules, but I would like them to be kind of "part of the framework"
and it would be easier for users if those rules were implicitly defined.
Many thanks in advance for any hint,
Best regards,
Bruno.
15 years, 4 months
Re: [rules-users] rules-users Digest, Vol 49, Issue 16
by Mike Love
Regards,
Mike Love
mike.love(a)symbiotics.co.za
-----Original Message-----
From: rules-users-request(a)lists.jboss.org
Sender: rules-users-bounces(a)lists.jboss.org
Date: Mon, 06 Dec 2010 04:15:57
To: <rules-users(a)lists.jboss.org>
Reply-To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 49, Issue 16
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Repackaging of the jar: missing drools.rulebase.conf?
(Kris Verlaenen)
2. Re: Task Server as Jboss Service (Cristiano Nicolai)
3. Drools Spring + JPA + JTA (Cristiano Nicolai)
4. Re: How to modify changeset.xml in guvnor (Jervis Liu)
5. new to Drools: modeling issues (Gabor Szokoli)
----------------------------------------------------------------------
Message: 1
Date: Sun, 05 Dec 2010 21:57:50 +0100
From: Kris Verlaenen <kris.verlaenen(a)cs.kuleuven.be>
Subject: Re: [rules-users] Repackaging of the jar: missing
drools.rulebase.conf?
To: Rules Users List <rules-users(a)lists.jboss.org>, drdaveg(a)gmail.com
Message-ID: <4CFBFCCE.1020507(a)cs.kuleuven.be>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
This is specified in the drools-core jar, in the
drools.default.rulebase.conf:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-core/src...
Kris
drdaveg wrote:
> 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!
>
------------------------------
Message: 2
Date: Mon, 6 Dec 2010 09:20:38 +1000
From: Cristiano Nicolai <cristiano.nicolai(a)gmail.com>
Subject: Re: [rules-users] Task Server as Jboss Service
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTimYSqyNCQi7uyKN2=2kUgxLXc5A0SaFfE4hLc-K(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
OK, done: https://jira.jboss.org/browse/JBRULES-2818
There's any reason for packing drools-process-task with persistence.xml? The
problem is that Jboss will try to deploy it if it's in the classpath.
Thanks.
2010/12/3 Mauricio Salatino <salaboy(a)gmail.com>
> You can create a jira issue explaining your contribution as a new feature.
> And attach a patch or the project into it. Then we will review it and let
> you know.
>
> 2010/12/3 Cristiano Nicolai <cristiano.nicolai(a)gmail.com>
>
> I'd done some work on deploying the task service on Jboss and I'm wondering
>> that could be a new maven module.
>> I also changed the rhq-plugin to control it over admin-console.
>>
>> How can I start to contribute with that?
>>
>> Thanks
>>
>>
>> On Thu, Dec 2, 2010 at 9:29 AM, Cristiano Nicolai <
>> cristiano.nicolai(a)gmail.com> wrote:
>>
>>> That's interesting and important as well, I'll give a try with HornetQ...
>>>
>>> There's any sample configuration? Which WorkItemHandler must be used...
>>>
>>> Thanks
>>>
>>>
>>> 2010/12/1 Mauricio Salatino <salaboy(a)gmail.com>
>>>
>>>> Hmm it really depends on your scenario.
>>>> Mina doesn't have message realibility and a lot of things that HornetQ
>>>> provides. But If you are OK with Mina you can use it.
>>>>
>>>>
>>>>
>>>> 2010/11/30 Cristiano Nicolai <cristiano.nicolai(a)gmail.com>
>>>>
>>>>> No, I didn't, I just saw some sources in the drools-process-task
>>>>> module. I preferred to go with what is in the documentation, wondering that
>>>>> Mina transport is the recommended approach.
>>>>>
>>>>> 2010/12/1 Mauricio Salatino <salaboy(a)gmail.com>
>>>>>
>>>>> did you try the HornetQ integration?
>>>>>> The main idea was to create a transport agnostic TaskServer, so for
>>>>>> each implementation you can choose between different technologies depending
>>>>>> on the situation.
>>>>>> I'm not sure if there is another effort for this kind of deployment..
>>>>>> if no one else answer this mail feel free to propose and contribute with
>>>>>> your ideas.
>>>>>> Greetings
>>>>>>
>>>>>> 2010/11/30 Cristiano Nicolai <cristiano.nicolai(a)gmail.com>
>>>>>>
>>>>>>> If there's no other way/plans to deploy it, even using HornetQ
>>>>>>> integration, I'll be more than happy to contribute!
>>>>>>>
>>>>>>> 2010/11/30 Mauricio Salatino <salaboy(a)gmail.com>
>>>>>>>
>>>>>>> I think that your idea would be a great contribution!
>>>>>>>>
>>>>>>>> 2010/11/30 Cristiano Nicolai <cristiano.nicolai(a)gmail.com>
>>>>>>>>
>>>>>>>>> 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
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>>
>>>>>>> Cristiano Nicolai
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>>
>>>>> Cristiano Nicolai
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Cristiano Nicolai
>>>
>>
>>
>>
>> --
>> Best regards,
>>
>> Cristiano Nicolai
>>
>> _______________________________________________
>> 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
>
>
--
Best regards,
Cristiano Nicolai
15 years, 4 months
Drools Spring + JPA + JTA
by Cristiano Nicolai
Hi guys,
I'm trying to deploy a spring based Knowledege Session with JPA persistence
on Jboss 5.1, I was able to do it using a RESOURCE_LOCAL persistence unit
but I would like to use a container JTA based deployment.
Basically, JPAConfiguration requires a Spring PlatformTransactionManager
then I tried to use the following combination:
<bean id="springTxManager"
class="org.springframework.transaction.jta.JtaTransactionManager" />
<jee:jndi-lookup id="springEMF" jndi-name="java:DroolsEMF"/>
The problem is that using it,
SingleSessionCommandService.initTransactionManager does not create a
JPAManager.
So, my guess for this to work is to add support for this on
SingleSessionCommandService or change JPAConfiguration
(drools-spring-1.0.0.xsd) to accept that no transaction-manager is defined,
causing Drools JtaTransactionManager to lookup the TransactionMananger from
JNDI context.
The only way that I could deploy it is using these beans definitions:
<bean id="springEMF"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceXmlLocation"
value="classpath:META-INF/spring-persistence.xml" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
</property>
</bean>
<bean id="springTxManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="springEMF" />
</bean>
Thanks.
--
Best regards,
Cristiano Nicolai
15 years, 4 months
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
15 years, 4 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.
15 years, 4 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
15 years, 4 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>
15 years, 4 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.
15 years, 4 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.
15 years, 4 months