Query about Drools
by sameer.bogawat
I have a project where I am allowing users to create rules from the
application UI. Currently all the rules related info is stored in a database
and the rules matching code is in Java. However this slows down the
application considerably and hence we are looking at using a third party
rules engine.
I have the following queries :
1. Is it possible to use the backend APIs (if any) to create/modify rules in
XML files in Drools on the fly i.e. at runtime ? We do not want to use the
Guvnor UI to create/modify rules.
2. We would be using a clustered environment , so is there any readymade
webservice which will update the rules at one location (from where the other
nodes can refer data).
Any help with the above queries would be of great help. Do let me know in
case you require extra information.
Thanks in Advance !
-Sameer
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Query-about-Drools-tp...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months
RuleBase serialization error in a cluster
by nir s
Hi,
We use drools in our application and store a compiled KnowledgeBase in
cache, all worked fine until we moved into cluster.
The stack trace:
2010-10-31 12:25:35,333 ERROR [] [org.jgroups.blocks.RpcDispatcher]
exception marshalling object
java.lang.ClassCastException:
org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput
cannot be cast to java.io.ObjectInputStream
at
org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:232)
at
org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:179)
at
org.drools.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:87)
at
org.jboss.serial.persister.ExternalizePersister.readData(ExternalizePersister.java:72)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
at
org.jboss.serial.io.JBossObjectInputStreamSharedTree.readObjectOverride(JBossObjectInputStreamSharedTree.java:61)
at
org.jboss.cache.marshall.JBossObjectStreamFactory$JBossObjectInputStreamOverride.readObjectOverride(JBossObjectStreamFactory.java:33)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
at
org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:432)
at
org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallMethodCall(TreeCacheMarshaller140.java:493)
at
org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:436)
at
org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallMethodCall(TreeCacheMarshaller140.java:493)
at
org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:436)
at
org.jboss.cache.marshall.TreeCacheMarshaller140.unmarshallObject(TreeCacheMarshaller140.java:405)
at
org.jboss.cache.marshall.TreeCacheMarshaller140.objectFromStream(TreeCacheMarshaller140.java:126)
at
org.jboss.cache.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:167)
at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:254)
at
org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:654)
at
org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:544)
at
org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:367)
at
org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:777)
at org.jgroups.JChannel.up(JChannel.java:1091)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:382)
at
org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:398)
at org.jgroups.stack.Protocol.passUp(Protocol.java:520)
at
org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:280)
at org.jgroups.stack.UpHandler.run(Protocol.java:60)
any idea?
BR,
Nir
15 years, 4 months
sliding window and explicit event expiration
by Samuli Saarinen
Hi,
Drools fusion documentation states that the engine calculates event
expires from rule constraints and uses the greater from the calculations
and @expires declaration. Do these calculations take sliding time
windows into account? E.g I hava event that sets @expires(1s) and a rule
that uses time window of 3s to detect 2 events in the given window.
Cheers,
Samuli
--
Remion Oy Etävalvontajärjestelmät liiketoiminnan
Samuli Saarinen tehostamiseen
gsm +358 (0)50 3560075
fax +358 (0)3 2125064 www.remion.com
15 years, 4 months