Generate PNG from .rf file
by Alan.Gairey@tessella.com
Is there a simple way, using the Drools API, to generate a PNG of a rule
flow, given a .rf file?
Thanks,
Alan
15 years
Delivery reports about your e-mail
by Post Office
The message was not delivered due to the following reason(s):
Your message could not be delivered because the destination server was
unreachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.
Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.
Your message could not be delivered within 4 days:
Server 66.193.71.75 is not responding.
The following recipients could not receive this message:
<rules-users(a)lists.jboss.org>
Please reply to postmaster(a)lists.jboss.org
if you feel this message to be in error.
15 years
Java interfaces and Buvnor jar model
by Libor Nenadál
Hello,
I failed to find some more in-depth documentation for objects that are
supported in Guvnor jar model but it seems that only instantiable beans are
supported now. It would be more practical to support also interfaces.
Here is the example I am trying to resolve:
For database access I use JPA annotated class. I want to work with it in the
Guvnor but also do not want to include JPA classes that the annotated class
imports. So I thought of declaring an interface that is uploaded to Guvnor
and JPA class would implement it. That it unfortunately not possible.
I can only create model bean that is uploaded to Guvnor and the JPA class
that extends the model bean. Is there any other elegant solution to this?
Thank you!
Libor Nenadál
--
View this message in context: http://old.nabble.com/Java-interfaces-and-Buvnor-jar-model-tp26215739p262...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Implementation of Rule Flow
by Dylan Rafael Rex DSouza
Hi all,
I am taking in details of a customer and determining the total income in one rule flow group. Also I have taken in details of the loan taken by the customer to determine the monthly repayment. This monthly repayment is taken in another ruleflowgroup to determine the total expenses per month. Then the total income from the first rule flow group and the total expenses is taken as input in another rule flow group using 'join'. These parameters then determine the rating of the customer.
However the rating shows as 0. and the only output that shows is the total income. kindly help.
I am attaching the src code along the repository_export.
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
15 years
Mvel and multithreading problem.
by Grigoriev, Grigoriy
Hello,
I have a project, that uses Drools 5.0.1. I have a class, called RuleFlowProcessor, that's used to apply some of my rules to the objects.
The instances of RuleFlowProcessor with the identical configuration should be used by different threads, and i use following mechanism:
I initialize one instance of RuleFlowProcessor, and the threads take copy of this instance, calling the 'clone()' method, which is not synchronized, and in which I just create new instance of
RuleFlowProcessor and init it, using the same data.
And therefore I get an exception:
Exception in thread "Thread-91" [Error: incomplete statement: (possible use of reserved keyword as identifier: )]
[Near : {... globals != empt ....}]
^
[Line: 0, Column: 0]
at org.mvel2.MVELInterpretedRuntime.parseAndExecuteInterpreted(MVELInterpretedRuntime.java:153)
at org.mvel2.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:44)
at org.mvel2.MVEL.eval(MVEL.java:514)
although, all the resources (.drl and .rf files) are parsed perfectly, when I use just one thread.
In actions of my ruleflow, the dialect: 'mvel' was set by default, if I set dialect to 'java' without modifying any code, the error doesn't occur.
The full stacktrace is in attach. I can send the project, that reproduces the problem, if needed.
Best regards,
Grigoriy Grigoriev.
15 years
Test for Empty String?
by Jason Davidson
Hello,
Is there an easy way to test if a String value is empty? I've been doing
this (Drools 4.0.7):
when CitationDTO
(
charge != null &&
charge.drivingIncidentLegalSpeedRate != null &&
charge.drivingIncidentLegalSpeedRate != ""
)
then ......
It seems like there has to be a better method.
Thanks,
Jason
15 years
Hierarchical rules and rules selection
by D Brock
I need my end user to be able to specify a set of hierchical rules. As a
contrived example, conceptually we would define rule files called
"Common.drl", "Truck.,drl", "Car.drl", "4-wheel drive.drl",
"Sports-Car.drl".
"4-wheel drive.drl" should include rules from "Truck.drl", which in turn
should rules from "Common.drl".
"Sports-Car.drl" should include rules from "Car.drl", which in turn should
rules from "Common.drl".
Now when a Vehicle object is inserted into memory, based on "class" property
= "4-wheel drive" it would execute against the rules of "4-wheel drive.drl"
and all of it's hierarchically included rules.
Similarly when a Vehicle object is inserted into memory, based on "class"
property = "Sports-Car" it would execute against the rules of
"Sports-Car.drl" and all of it's hierarchically included rules.
Is this possible, and if so how would it be best implemented? It seems like
there should be an "include" keyword in the DRL language that would include
contents from another DRL file. But even with this there would be the issue
if selected which rules should be used.
Would appreciate any help you can give....Thanks
--
View this message in context: http://old.nabble.com/Hierarchical-rules-and-rules-selection-tp26201268p2...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Delivery reports about your e-mail
by The Post Office
The original message was received at Thu, 5 Nov 2009 14:38:35 +0800
from lists.jboss.org [100.45.141.246]
----- The following addresses had permanent fatal errors -----
rules-users(a)lists.jboss.org
----- Transcript of the session follows -----
... while talking to server 129.214.71.15:
554 Service unavailable; [12.81.29.214] blocked using bl.spamcop.net, reason: Blocked
Session aborted
15 years
Re: [rules-users] Execution time for drools5.0 against large data size
by Abarna Ramachandran
I have tried couple of things as suggested by the rules user list. It has
improved the execution time of hello world example to some extent.
1. Moving fireallRules() out of the loop - helped very little, execution
time was almost same(150 millisecs less). - 10.35 secs
2. Commenting out the audit logger used in the example - cut the execution
time by half 5.67 secs
3. Removing system.outs from rules - reduces 2 secs of execution time -
3.433
The final execution time for HelloWorldExample in drools5.0 is 3.4 secs and
in Java is 256 milli secs. (I am attaching the java version of drools
example also to this email) .
package org.drools.examples;
import java.util.List;
import org.drools.examples.HelloWorldExample.Message;
public class HelloWorldJavaExample {
public static long starttime = 0;
public static long endtime =0;
public static void hello(Message message)
{
System.out.println(message.getMessage());
message.setMessage("Good Bye Cruel World");
message.setStatus(Message.GOODBYE);
goodbye(message);
}
public static void goodbye(Message message)
{
System.out.println(message.getMessage());
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
starttime = System.currentTimeMillis();
for(int u=0;u<10000;u++)
{
final Message message = new Message();
message.setMessage("Hello World");
message.setStatus(Message.HELLO);
if(message.getMessage().equalsIgnoreCase("Hello
World"))
{
hello(message);
}
}
endtime = System.currentTimeMillis();
System.out.println("execution time in main is
"+(endtime-starttime));
}
public static class Message {
public static final int HELLO = 0;
public static final int GOODBYE = 1;
private String message;
private int status;
public Message() {
}
public String getMessage() {
return this.message;
}
public void setMessage(final String message) {
this.message = message;
}
public int getStatus() {
return this.status;
}
public void setStatus(final int status) {
this.status = status;
}
public static Message doSomething(Message message) {
return message;
}
public boolean isSomething(String msg, List list) {
list.add(this);
return this.message.equals(msg);
}
}
}
thanks for your suggestions.
ABRA2
15 years