Drools Fusion: updating event duration
by Matteo Cusmai
Hi all,
i am using Drools Fusion in multi sensor data fusion system. I have some
rules that generate a new event when some situations occur. But from the
other hand, i would like to update the event, when i understand that new
sensor observation is referring to the same event. I have my Event clazz
with duration field, i try to update it in modify clause, but i have
concern about it, because when i use temporal operator (such as before,
meets, so on) it seems that Drools manage them as event with duration null.
I could post the code too.
Bye bye,
Matteo.
14 years
JRules to Drools migration
by massios
Dear all,
I am interested to find out how easy/hard it would be to migrate rules from
IBM WebSphere JRules to Drools. I understand this would involve a
considerate amount of effort for the migration, testing and deployment of
the rules.
Is there a tool that can help with the migration of at least the rule
constructs so that we can concentrate our attention with testing the
automigration and with the migratiion the code invoking the rule engine?
Thanks in advance,
Nikos
--
View this message in context: http://drools.46999.n3.nabble.com/JRules-to-Drools-migration-tp3769164p37...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years
Filtering inside the LHS
by Hezi Stern
Hi All,
I am seeking some kind of filtering (if statement) inside the LHS.
I have the following example rule (note: $attributeFilteredSentences and
$cmdescriptor are defined in the extends rule which is not presented):
rule " choose message sentence example" extends " attributeFilteredSentences
collection"
when
SContextState(state == SContextState.ONE)
$sentences: ArrayList()
from collect (Sentences.Sentence(
descriptor.meanings.meaning == $cmdescriptor.meanings.meaning
) from
$attributeFilteredSentences)
then
logger.info("RULE: entered rule: "+drools.getRule().getName());
//some logic.
end
as can be seen I am filtering sentences based on the meanings, and the
meaning collection must be identical as in $cmdescriptor (this is the case
when SContextState.ONE)
Now to my question: I have cases ((this is the case when SContextState.TWO)
where I do not need exact validation but rather superset of (for this I have
a supersetOf operator implemented)
I would like to avoid duplicating this rule (as I have similar condition in
many other rules) and being able to filter once with "==" and once with
"supersetOf" depending on the SContextState.
Any ideas how to do this?
Thanks,
Hezi
14 years
Bug with BatchExecutionHelper when using Log4j rootlogger?
by dunnlow
Hi,
I have a small drools client that sends a pojo to a Drools Server using
xstream:
MyBean mb = new MyBean();
List<Command> cmds = new ArrayList<Command>();
InsertObjectCommand insertCmd = (InsertObjectCommand)
CommandFactory.newInsert(mb);
insertCmd.setOutIdentifier("inserter");
insertCmd.setEntryPoint("Default");
cmds.add(insertCmd);
FireAllRulesCommand fireAllRulesCommand = new FireAllRulesCommand();
cmds.add(fireAllRulesCommand);
BatchExecutionCommand command =
CommandFactory.newBatchExecution(cmds,"ksession1");
String xml BatchExecutionHelper.newXstreammarshaller().toXML(command); *<--
this XML is sent to the server*
..........8<
Pretty standard, I think. It works just fine and I get a http 200 response
back from my server.
HOWEVER, if I add log4j (log4j.1.2.14.jar) and a log4j.properties that has a
root logger (set to any level) the XML produced includes an "appenderList"
which seems to be trying to stream the log4j appenders (e.g.
org.apache.log4j.ConsoleAppender). I'm guessing these are not serializable
(no surprise there) and the server complains about the XML. (fyi, the same
log4j jar is on the drools server)
Is this a known issue/expected? I can comment out the root logger and
everything is back to ok.
Thanks for any insight,
-J
--
View this message in context: http://drools.46999.n3.nabble.com/Bug-with-BatchExecutionHelper-when-usin...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years