Problem with or condition
by Ayush
Hi, I'm getting problem while executing rule with or condition.
My rule is like
MyEvent () from entry-point MyStream
Number($objCountForOne : doubleValue) from accumulate( MyEvent(prop1 ==
"One") over window:time(1m) from entry-point MyStream,count())
eval($objCountForOne > getMyNodeCount()*0.35)
or
MyEvent () from entry-point MyStream
Number( $objCountForTwo : doubleValue) from accumulate( MyEvent(prop1 ==
"Two"), count())
eval($objCountForTwo >= getMyConnectionCount()*0.40)
The above rule both conditions run well when executed separately but when I
merge them using or they don't work well. When I inserted the event for 1st
condition it does not gets executed because the last eval line in 2nd
condition i.e. "eval($objCountForTwo >= getMyConnectionCount()*0.40)" is
false.
Now I have to run them like if conditions in java i.e. if(1st == true || 2nd
== true) then do my work.
Please let me know how can I solve it?
Thanks in advance.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-with-or-condi...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 8 months
Problem implementing dynamic regular expression
by Ayush
Hi, I'm trying to implement regular expression using matches. The regular
expression is dynamic and retrieved from a java function. In my first
approach I'm tried to call the java function for matches like
MyEvent(prop1 matches "This event is for"+getPropName()+" and is sent to
blah blah blah")
Now when I try to execute the above expression it gives error as illegal
statement (I even tried back-slash to escape it). It also gives error like
"Expecting ')' instead of '(' ".
So I declared a function which takes two string parameters and returns me
the concatenated one.
function String concatenate(String str1, String str2) {
return str1+str2;
}
$matchStr : String() from concatenate("This event is for",getPropName()+"
and is sent to blah blah blah")
Now when I'm using this variable in my rule it is not getting executed.
Please note that there is no problem in regex because when I put the regex
as string (i.e. without using any function to retreive it) it works fine.
MyEvent(prop1 matches $matchStr)
Can anyone please let me know how can I solve it. Thanks in advance.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-implementing-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 8 months
JDK1.5 Future for Drools and jBPM
by Mark Proctor
http://blog.athico.com/2011/01/jdk15-future-for-drools-and-jbpm.html
Dropping JDK1.5 is something that rears it's head from time to time, and
we know we have to address it sooner or later.
We recognise that the majority of people would like to see JDK1.5
dropped, but there are still a few large critical enterprises using
Drools and jBPM on JDK1.5.
Technically for us there isn't a huge advantage, and certainly no "must
have" feature, in the same way that moving from 1.4 to 1.5 was. However
it does make the project easier to manage: less runtime targets to test
against and we don't need to double check people are putting JDK1.6 only
classes in Drools and jBPM.
My personally opinion is that we need a widest audience possible for the
up coming jBPM5 release and we still have some critical things I'd like
to see in Drools first. So personally I'd like to wait until the last
few months of this year, say October, before dumping JDK1.5; which would
allow for a very late 2011 release or very ealry 2012 release that is
JDK1.6+.
What do people think? Comments welcome, I've also added a poll on the
right side.
Mark
14 years, 8 months
Interfacing with gwt-console
by Jim West
Hi all,
I have business process running inside the gwt-console and I need to be able
to send facts and start it from another application (a remote client). Does
gwt-console expose an API over Rest, SOAP, other, for this purpose?
Drools Server exposes such interface, but using it I will lose the
possibility to see graphically the business process evolving (I believe this
functionality is only inside the gwt-console).
Your help/advice is much appreciated.
Jim
14 years, 8 months
Use of function in Drools Test Scenario
by Abbo
Hi,
I am a newbie on Drools, don't mind me asking stupid questions :)
W've started using Drools, first in a Proof-Of-Concept mode for a large
scale project in which we have developers and analysts using Drools. As an
analyst I defined the Rules and Test Scenarios in Guvnor. The developer has
added some functions too in the Repository in the same package as my Rules
and Test Scenarios are. So far so good. However, I encounter problems when
using the functions in my Test Scenario. I receive a:
[Error: no such method or function: timeStringToLong] [Near : {... new
java.util.Date(), "17:00" ....}] ^ [Line: 1, Column: 0]
The first part of the Test Scenario looks like:
GIVEN
insert [Segment] [$seg]
arrivalTime: =timeStringToLong(new java.util.Date(), "17:00")
If I use eval() around the function call or prefix it with the package name
it does not help.
So all this leads to the questions:
- is it possible to use function calls in Test Scenarios?
- what is the format to call functions?
- is there somewhere documentation about input values, formats, etc.
- do I have the fully qualify the Date parameter?
Thanks very much!
Abbo
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Use-of-function-in-Dr...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 8 months
Some doubts on Guvnor
by Diego Martins
Hello!
So, let'me explain what is happening first...
I'm developing a project based on seam 2.2.0, and we used to have guvnor
(5.0.1) working perfectly. So, suddenly I decided it was time to move on and
start using the newest version (5.1.1, i guess). Made a backup of the older
version, configured the newer guvnor and deployed it. But I didn't know
Guvnor 5.1.1 had this need to authenticate in order to retrieve the binary
packages, which causes some trouble with seam 2.2.0, since I can't configure
username and password on my rules.properties, making it impossible to
integrate them.
Then I decided to move back to my good old guvnor 5.0.1, but as I tried to
deploy, malign forces started acting and, what worked perfectly before, no
longer works. This is the exception: http://pastebin.com/VUWxJyLD
(BTW, I'm using tomcat 6)
So, nothing changed, but suddenly Guvnor 5.0.1 no longer deploys.
I tried to find this version on Jboss Drools website, without success. Looks
like the only version available is the newest.
So, I came to you kindly asking for urgent help... It could be on how to fix
this exception and make my backup deployable again, or on how to get older
versions of Guvnor (preferably 5.0.1).
Thanks already!
Diego Martins
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Some-doubts-on-Guvnor...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 8 months
Use of DroolsManagementAgentMBean
by asutosh_pandya
Hello all,
I need to grab all the information/statistics after firing all the rules. It
is observed that the same can be achieved by different event listeners in
drools. But I don't want to use listeners, instead I need all the
information after firing all the rules. Going through the Drools API, I came
across an interface DroolsManagementAgentMBean which can provide the above
information. I tried to google out the way we need to implement this
interface but in vain.
can any one please let me know how can I achieve the above without using
listeners and at the same time how can I use DroolsManagementAgentMBean?
Thanks in advance,
Asutosh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Use-of-DroolsManageme...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 8 months