[rules-users] help! the field *** is not visible

2011-04-12 Thread 赵慧
hello,everyone!I wrote a rule with Drools,but the error told me that the field Server.Message is not visible, I can't find how it happens. Please help me, I am almost exhausted with it. thank you. the rules are as follows: package com.sample import com.sample.Server; rule system will

Re: [rules-users] help! the field *** is not visible

2011-04-12 Thread Michael Anstis
A better approach would be to use:- rule system will execute 'tc' command when Server(message8388608) then System.out.println(The network is so crowd that it needs repairing.); Runtime.getRuntime().exec(tc);#execute the tc command end This assumes you insert Server facts into

[rules-users] completing persisted workItem doesn't complete a process

2011-04-12 Thread gs76pl
hi, i've a very simple process with only 4 work items that run async. For steps WI1 WI2 i complete each step but when the process reaches WI3 step i manually kill the whole process and then load it from a database i.e. ksession.loadStatefullSess.. Now after i complete WI3 step i can see that

[rules-users] rule task inside forEach element

2011-04-12 Thread Piotrek
Hi, I am trying to do some simple example with forEach element. I have put Rule Task element inside forEach, but when I am trying to compile i am getting: [-1,-1]: Process 'flow' [w2p]: RuleSet node 'Rule' [7] has no incoming connection.[-1,-1]: Process 'flow' [w2p]: RuleSet node 'Rule' [7] has

[rules-users] Support for Probabilistic reasoning FOL

2011-04-12 Thread Arjun Dhar
Hi, though it is clear Rule Engine (lke Drools) supports Declarative programming and First order Logic or FOL (with existential quantifiers and works) am also looking for Probabilistic Reasoning. Example: Fact: A U B = C; this fact exists with a probability of 0.9. Principles namely being:

Re: [rules-users] rule task inside forEach element

2011-04-12 Thread sDaniel
Hello Piotrek, maybe what you are looking for is Forall? http://www.jboss.org/drools/drools-expert.html or Accumulate Functions? http://blog.athico.com/2007/06/accumulate-functions-edson-tirelli.html Sebastian Am 12.04.2011 16:24, schrieb Piotrek: Hi, I am trying to do some simple example

Re: [rules-users] rule task inside forEach element

2011-04-12 Thread Piotrek
Sorry my fault i haven't said that i mean drools flow forEach element. Like on the attached image. http://drools.46999.n3.nabble.com/file/n2811019/test.png -- View this message in context: http://drools.46999.n3.nabble.com/rule-task-inside-forEach-element-tp2810896p2811019.html Sent from the

[rules-users] Insert an object containing a HashMap

2011-04-12 Thread hbunny
Hello, I have searched the forum for information on this case, but I haven't find, at least yet. I am trying to insert an object containing a HashMap, but when I call ksession.insert( fact ) method I get this error: java.lang.ClassCastException: java.util.HashMap cannot be cast to

Re: [rules-users] completing persisted workItem (the last in a process) doesn't complete a process

2011-04-12 Thread gs76pl
hi, two updates to the previous post: 1. it looks like the reason why i can't see the process status changed to COMPLETED is because of something going wrong with JPA and what a session obtained using its API can see i.e. my custom work item code looks like below: public void

Re: [rules-users] Insert an object containing a HashMap

2011-04-12 Thread Wolfgang Laun
Java or DRL declaration of the fact object, please? Also, are you using the HashMap field of that fact in any rules, and if so, how? And, perhaps, the full stack trace? -W On 12 April 2011 14:06, hbunny off...@interdevelopments.ro wrote: Hello, I have searched the forum for information on

Re: [rules-users] help! the field *** is not visible

2011-04-12 Thread John Peterson
Try adding 'dialect mvel' (no single quotes) after the rule name to the top of each of the rules. I have seen this error before and doing this resolved the issue. hello,everyone!I wrote a rule with Drools,but the error told me that the field Server.Message is not visible, I can't find how it

Re: [rules-users] help! the field *** is not visible

2011-04-12 Thread Wolfgang Laun
Still, accessing the class field com.sample.Server.Message in eval() in this way is almost certainly not a good approach. But note that dialect mvel may be written preceding all the rules it should apply to. -W On 12 April 2011 14:38, John Peterson john.peterson.g...@statefarm.comwrote:

[rules-users] Existing Test Harnesses for Drools?

2011-04-12 Thread John Peterson
I was wondering if anyone out there is aware of any Test Harnesses that could be used for regression testing Drools applications out there? We found this spreadsheet tester from Michael Neale: https://github.com/michaelneale/rule-spreadsheet-tester/#readme Are there any others? Thanks!

Re: [rules-users] completing persisted workItem (the last in a process) doesn't complete a process

2011-04-12 Thread gs76pl
for those interested the problem was that i misinterpreted ProcessInstance object as something that always gets updated whenever underlying process changes, whereas in fact that's the version of a process obtained at the specific moment. This is especially true while working with persistence. So

Re: [rules-users] completing persisted workItem (the last in a process) doesn't complete a process

2011-04-12 Thread Dan Nathanson
I ran into this issue also. I was told that the ProcessInstance you are looking at is just a snapshot of what was loaded from the DB. It doesn't get updated after being loaded. I wasn't told why this was the behavior, just that it was expected. Didn't seem intuitive to me. I was told that the

[rules-users] is it correct that rows in a sessioninfo table in df persistence never get deleted?

2011-04-12 Thread gs76pl
hi, i'm not sure whether it's OK or not but while using drools flow persistence records in [i]sessioninfo[/i] table never get deleted ? Once i'm done with the process and call knowledgeSession.dispose() previously created record in a table doesn't get removed? Is it correct that sessioninfo table

Re: [rules-users] completing persisted workItem (the last in a process) doesn't complete a process

2011-04-12 Thread Kris Verlaenen
A process instance is disconnected once the command is completed. This means that it will represent the state at the end of the command and won't be updated when the process instance actually changes. You can however always get the latest snapshot using ksession.getProcessInstance(id).

Re: [rules-users] is it correct that rows in a sessioninfo table in df persistence never get deleted?

2011-04-12 Thread Kris Verlaenen
Yes, as disposing a session doesn't mean you don't want to restore it at some point later from persistence. You might for example temporarily want to dispose the session since you know it is no longer needed (short-term) and recreate it later whenever necessary. If you don't need the session

Re: [rules-users] is it correct that rows in a sessioninfo table in df persistence never get deleted?

2011-04-12 Thread gs76pl
ok, thanks for explanation. at least now i can say that my process works exactly as it should :) -- View this message in context: http://drools.46999.n3.nabble.com/is-it-correct-that-rows-in-a-sessioninfo-table-in-df-persistence-never-get-deleted-tp2812026p2812134.html Sent from the Drools:

[rules-users] Calling a method with varargs

2011-04-12 Thread janders
Hey all, I've got a rule in a DRL file that I'm trying to call an object method that contains a varargs parameter. The method signature looks like so: public void addMessage(int displayPriority, String messageFormat, Object... messageArgs) { The rule looks like so: rule Notice Quantity no-loop

Re: [rules-users] Existing Test Harnesses for Drools?

2011-04-12 Thread Ansgar Konermann
On 12.04.2011 14:46, John Peterson wrote: I was wondering if anyone out there is aware of any Test Harnesses that could be used for regression testing Drools applications out there? We found this spreadsheet tester from Michael Neale:

Re: [rules-users] Calling a method with varargs

2011-04-12 Thread janders
Apologies, I solved my own problem after banging my head for a spell. I just needed to surround the varargs portion of the method arguments with curly braces { } to force the arguments into an array. The new consequence clause looks like so: $explanation.addMessage(1, %s Quantity = %,d,

Re: [rules-users] Support for Probabilistic reasoning FOL

2011-04-12 Thread Mauricio Salatino
Hi there, Davide Sotara a.k.a. sotty in the IRC channel was working on that side of the project. As far as I know he already get it working. Ping him in the channel if you see him online. On Tue, Apr 12, 2011 at 8:03 AM, Arjun Dhar dhar...@yahoo.com wrote: Hi, though it is clear Rule Engine

[rules-users] help! rulerule_key failed to predicate

2011-04-12 Thread 赵慧
hi,thank you very much for helping me with the problem.nevertheless,I have got another error. I compile the program and get the errors as follows: [4,0]: [ERR 103] Line 4:0 rule 'rule_key' failed predicate: {(validateIdentifierKey(DroolsSoftKeywords.RULE))}? in rule [4,9]: [ERR 101] Line 4:9 no

Re: [rules-users] Calling a method with varargs

2011-04-12 Thread Mark Proctor
On 12/04/2011 18:36, janders wrote: Apologies, I solved my own problem after banging my head for a spell. I just needed to surround the varargs portion of the method arguments with curly braces { } to force the arguments into an array. The new consequence clause looks like so: