Declarative model does not replicate
by devan.vanreenen@gmail.com
Hi there,
I am using Guvnor 5.0.0
I have a Guvnor running in a cluster, Guvnor uses Oracle DB for the repo.
When I add rules, functions or upload a POJO model jar, the different guvnor
instances are in synch, however this is not the case for my declarative
model which is not in synch.
My apologies if this should be posted in the JackRabbit forum rather than
this one but if you have any suggestions it would be appreciated. I will
post there as well.
Many thanks
Devan
--
View this message in context: http://drools.46999.n3.nabble.com/Declarative-model-does-not-replicate-tp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
BigDecimal comparison
by devan.vanreenen@gmail.com
Hi there,
Please assist.
I have an object MaxCap that has a single property capAmount of type
BigDecimal.
The BigDecimal is negative
when the rule is
MaxCap( capAmount.doubleValue < 0.00 ) it doesnt fire, which I expect it
should but when the rule is
MaxCap( capAmount.doubleValue > 0.00 ) then the rules fires, so the rule
recognises my negative number as a positive one.
Any help would be appreciated.
Thanks
Devan
--
View this message in context: http://drools.46999.n3.nabble.com/BigDecimal-comparison-tp4017841.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
Else condition in drl file
by learner
Hi,
I have a scenario like
if(value == 200){
// then do something
}else if(value == 100){
// then do something
}else{
value = 0
}
I created drl with 3 rules
Rule 1 : value equal 200
Rule 2 : value equal 100
Rule 3 : value not equal to 100 or 200(ie by value!=200 & value!=100 ).
Is there a way by which I can simplify the condition in rule 3.
--
View this message in context: http://drools.46999.n3.nabble.com/Else-condition-in-drl-file-tp4017903.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
Managing Sets of Rules
by tlee
Hi,
Are there any guidelines or recommendations for how best to isolate
different groups of rules? For example, I'm using decision tables to do
some (initially) simple inter-system value mappings/translation. The
generated rules look like this:
Decision Table 1:
rule "mapCountry"
salience 65496
when
String(toString == 'SRI LANKA')
then
result.put('countryCode', 'apac.sri-lanka');
drools.halt();
end
I will have other decision tables that also match against String values.
If I want to isolate these decision tables so that only one set of the rules
fire when calling 'execute' on the knowledge session, should I put them in
different knowledge bases? Or is there another way? Or am I going about
this the wrong way all together?
Many Thanks,
Tim.
--
View this message in context: http://drools.46999.n3.nabble.com/Managing-Sets-of-Rules-tp4017898.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
how to declare an identifier and use it?
by vysrinivas
Hi,
Requirement:
i have a function which will return a value. Say for example String
getInfo().
In header level, i have a tag called as TType. possible values in this tag
are Online/offline.
In line level, i have a validation which should be executed based on TType.
if i get TType = online, line level validation has to be executed.
if i get TType = offline, then line level validation has to be skipped. No
validation should happen.
Solution:
I have to call getInfo() function in linelevel <java:condition> so that it
will return me the TType value.
based on TType, validation will happen / can be skipped.
Issue:
As i am declaring given below.
<rule name="12_Line_Validation">
<parameter identifier="THeader">
<java:class>THeaderType</java:class>
</parameter>
<parameter identifier="TReqLine">
<java:class>TLineType</java:class>
</parameter>
<java:condition>
getQType(TReqHeader) != null
|| !getInfo(TReqHeader).equals("Online")
</java:condition>
<java:condition>
getOffType(TReqLine).equals("Local")
</java:condition>
As show above, i am having two java conditions.
1. it will verify whether TType is online / offline.
2. it will verify whether offtype is Local or not
when i test with valid data, it never perform above validations. it just
skip both the validations irrespective whether TType is online/ offline.
Suggestion:
Can anyone let me know what might be the issue?
1. Is it that i am having both header and line program calls in one rule?
2. is it that i cannot use header value in line level validation?
work around:
is there any work around as given below
can i declare a variable/identifier in line and invoke the method and have
the return value in the declared identifier?
<parameter identifier="TType">
<java:method>getInfo(TReqHeader)</java:method>
</parameter>
so that i can use this TType within the line <java:condition>.
Please verify and suggest possible way to fix this issue.
let me know if you need any other info.
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-declare-an-identifier-and-use-it...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months