drools5.3.0 rule time error with osgi environment
by Zhao Yi
I am using drools 5.3.0 and work in osgi environment. i have installed
drools-core, drools-api, drools-compiler and drools-tempalte in osgi
context. I have no problem to load knowledgebase but get error when fire
rules, please see below error message. Does anyone know how to fix it?
java.lang.LinkageError: loader constraint violation: when resolving
interface method
"org.drools.spi.KnowledgeHelper.update(Lorg/drools/FactHandle;)V" the class
loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader) of the current
class, defaultpkg/Rule_ScanRange__startLocationCheck, and the class loader
(instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for
resolved class, org/drools/spi/KnowledgeHelper, have different Class objects
for the type org/drools/FactHandle used in the signature
java.lang.LinkageError: loader constraint violation: when resolving
interface method
"org.drools.spi.KnowledgeHelper.update(Lorg/drools/FactHandle;)V" the class
loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader) of the current
class, defaultpkg/Rule_ScanRange__startLocationCheck, and the class loader
(instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for
resolved class, org/drools/spi/KnowledgeHelper, have different Class objects
for the type org/drools/FactHandle used in the signature
--
View this message in context: http://drools.46999.n3.nabble.com/drools5-3-0-rule-time-error-with-osgi-e...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months
Getting Error while using Drools 5.3.0
by mkhan_rt54fde
Hi,
My application works fine with Drools v 4.0.7. However, when I run my
application using Drools 5.3.0, I am getting the following error:
org.drools.rule.InvalidRulePackage: Evaluator '>' does not support type
'ValueType = 'String' : [Rule name='VIN required for newer vehicles']
at org.drools.rule.Package.checkValidity(Package.java:478)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:481)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:458)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:465)
Here is the condition I am using in my .dsl file:
[condition][]request contains no VIN and the car was built after year
{value}=info: CarRulesInfo(quoteRequest.VIN == null, quoteRequest.modelyear
> 1982 )
Any suggestions on how to fix this problem.
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Getting-Error-while-using-Drools-5-3-0-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months
Even to check if all the rules have been fired
by sumatheja
Hi All,
I'm using a stateful knowledge session in my project, where *
ksession.fireUntilHalt()* will trigger the rules as and when the facts are
inserted. I,m developing a functionaly where I need to insert some new
facts and and retract them once the valid rules have been fired. I'm unable
to find the exact event listener to check if all the valid rules have been
fired. Do I need to handle this case(is it implicitly handled)?
*AfterActivationFiredEvent
*seems to be activated after successfully firing each rule, so I feel this
wont serve the purpose. Thanks in advance.
--
cheers
Sumatheja Dasararaju
13 years, 7 months
Advanced Enum options not working in Guvnor 5.4 Decision table
by worldofprasanna
Hi,
Am trying to use the Enums which are dependent on other enums (similar to
that of engineType and petrolType example given in the doc). But this
feature works well for Business rule not in case of Decision table. In
decision table, I got the engineType updated with the enum values while
petrolType is still displaying Textbox to enter the values.
code :
'Item.category':['Consumer','Electronics']
'Item.subcategory[category=Consumer]':['Television','Radio']
'Item.subcategory[category=Electronics]':['Apple','Sony']
Kindly let me know how can I use Advanced Enum option in Decision table.
Thanks,
Prasanna.
--
View this message in context: http://drools.46999.n3.nabble.com/Advanced-Enum-options-not-working-in-Gu...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months
Drools 5.3 Salience
by gboro54
I know using salience is not the best way to order rules but some of our
rules do have a higher priority then others. Since we are writing the rules
using a DSL I have created set set of Priority levels which set the
salience. One of these levels set salience to 0(default value). Is there any
harm in putting this on every rule with no priority for consistence when
reading the rules.
TIA
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-3-Salience-tp3955545.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months
Re: [rules-users] Does Drools have a Rules Authoring engine?
by gboro54
Rule authoring in Drools can be done in 2 ways: with the Eclipse or Guvnor. I
am not sure what you mean by a Rules Authoring Engine though. What
requirements to you have for rule authoring? Are business users or developer
authoring rules?
vsm wrote
>
> Drools is a Business Rules Management Engine. I wanted to know if Drools
> has any front-end application that does Rules Authoring?
>
> If yes, then let me know some additional details about it.
> If not, then any suggestions on which Rules Authoring engine would be a
> good alternative with Drools?
>
> Thanks in advance!
>
--
View this message in context: http://drools.46999.n3.nabble.com/Does-Drools-have-a-Rules-Authoring-engi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months
Query for a fact, and concurrent rule execution
by stelomax
Hi,
Please bear with me, I am relatively new to the world of Drools and have a
question. I am hoping it will be a simple issue.
First let me frame my planned implementation at a high level. I am hoping
to use Drools as a real time service enabled quote validation tool.
Facts representing products and attributes will be loaded into a stateful
knowledge session upon boot (using a piece of Java that loads these as facts
from our product DB).
The front-end application will allow users to build up quotes consisting of
quote lines that make references to these products. Once the quote is built
they will press a "Validate" button. This will call a webservice that will:
1) Insert the quote details as facts into the knowledge session
2) Run a "rule flow" to validate the quote against the product facts
3) The rules will insert validation results as facts tagged against the
quote
4) QUERY for the validation results
5) Retract the facts for the quote (inc validation results)
6) Send the validation results back as a response to the webservice call
My first question is how to implement step 4 --> how to physically query for
the validation results pertaining to that specific quote. Any help here
would be greatly appreciated.
My second question relates to concurrency. As this is a quote validation
tool there will be multiple users validating quotes so we will get
concurrent validation requests.
What is the recommended manner of dealing with concurrent rule requests
within a stateful knowledge session. If 2 people attempt to validate a
different quote at the same time we will have two quotes within the
knowledge session together with all of the product facts. Is drools capable
of running two concurrent rule flows against the knowledge session, each
referencing a different quote or would we need to instantiate 2 knowledge
sessions, or even deal with the matter in a serial manner placing the 2nd
quote validation flow on hold until the first completes?
Any help/pointers would be great. I am hoping someone out there has
attempted to use Drools in a similar manner :)
Many Thanks
Ste
--
View this message in context: http://drools.46999.n3.nabble.com/Query-for-a-fact-and-concurrent-rule-ex...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months
Re: [rules-users] DRL to DT
by FrankVhh
The ignorant poster in the next post had an issue that has some remarkable
resemblances with your case:
http://drools.46999.n3.nabble.com/Decision-Table-td2150980.html
There is a sample xls attached somewhere that should help answering your
questions.
Regards,
Frank
drools_newbie wrote
>
> Hello All,
>
> I'm trying to write one simple rule
> (As I have in .drl file)
> dialect "mvel"
> rule "Forst"
> no-loop
> when
> $weather: Weather(temperature < -12.0)
> $assignment:Assignment()
> then
> modify($assignment){
> message="very cold !!!",
> level=Assignment.MAINROADSANDCITYCENTERS;
> }
> end
> in a Decision table. How do I declare *assignment* object type in decision
> table?
>
> Thanks,
> Anita
>
--
View this message in context: http://drools.46999.n3.nabble.com/DRL-to-DT-tp3953737p3954924.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months