Any news on Drools 5.1
by Chuck Irvine
I am planning on diving into a Drools based workflow related project pretty
soon and have kind of been waiting for 5.1 to come out (or maybe the next
milestone release). Any news on 5.1 availability? Thanks -Chuck
15 years, 11 months
Drools + ETL Process
by andre.fonseca@mail.com
Hi all,
I am using Drools 5.0 with Tomcat 6 and MySQL.
Now I need to insert data in the drools database but I DON'T want to use the Guvnor interface.
This is because in the future we'll need to use a kind of ETL process to populate the drools database.
Should I create a java class with JDBC access and perform a SQL direct to that tables?
I did the reverse engineering of the drools database but I could not understood yet where the data are persisted.
Any advice should be very helpful.
Thanks in advance.
15 years, 11 months
How to make this rule more memory efficient?
by Ryan Fitzgerald
Hi,
Can anyone advise me on how to make a drools rule more memory efficient? Here is the problem:
I have a Cell and a ProxyCell object classes.
The ProxyCell represents the Cell when their internal ID's match.
Each Cell and ProxyCell however has a unique name (not same as ID).
A Cell can reference (by name) a ProxyCell (as long as the ProxyCell does not represent that actual Cell - which would effectively be a self-reference and is not allowed).
What I want to do is find out where I have a reference from any instance of Cell - cell1 - to any instance of ProxyCell - proxycell2 - but am missing a reference from cell2 to proxycell1 where proxycell2 is a representation of cell2 and proxycell1 is a representation of cell1.
Here is the rule I have written for it:
rule "Check consistent references"
when
$cell1 : Cell()
$cell2 : Cell()
$proxycell1 : ProxyCell ( id = $cell1.id, $cell2.references contains this.name )
$proxycell2 : ProxyCell ( id = $cell2.id, $cell1.references not contains this.name )
then
//report an error.....
end
I have 10,000 instances of Cell and 10,000 instances of ProxyCell in working memory. For each instance of Cell, it can have references to 60 different ProxyCell instances. Loading the Cell and ProxyCell instances into working memory is not a problem. However, when I try to run this rule above, the memory quickly goes above 1GB and I eventually get an out of memory error.
I was wondering if there is a better way to structure or write this rule so that it doesn't use so much memory.
Thanks,
Ryan.
15 years, 11 months
Flow - handling multiple events of the same kind
by Ed Staub
If the same event-node is triggered twice with different data, the same
variable will be recycled for the different data payloads. How does one
ensure that data is not lost?
My best guess is to follow the event node with a composite node, and copy
the top-level variables into the composite's variable scope in the first
sub-node of the composite. But I'm not sure whether I can guarantee that
the composite will be able to do that before the engine handles the second
event.
Suggestions?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Flow-handling-multipl...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 11 months
Problem with the Decision table
by Manikandan
Hi
Below is the code i use to run the rules in the decision table. I am
inserting the empty even object into the session but i still get the "Cannot
be resolved issues". I have attached my decison table as well. Am new to
DRools, so please help.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
DecisionTableConfiguration dtableconfiguration = KnowledgeBuilderFactory.*
newDecisionTableConfiguration*();
dtableconfiguration.setInputType( DecisionTableInputType.*XLS* );
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.*newKnowledgeBuilder*();
kbuilder.add( ResourceFactory.*newClassPathResource*(
"RFC36877ScenarioDT.xls",
getClass() ),
ResourceType.*DTABLE*,
dtableconfiguration );
*if* ( kbuilder.hasErrors() ) {
System.*err*.print( kbuilder.getErrors() );
*return* -1;
}
KnowledgeBase kbase = KnowledgeBaseFactory.*newKnowledgeBase*();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
// typical decision tables are used *statelessly
*
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
//now create some test data
Input input = *new* Input();
System.*out*.println("creating the event...");
BusinessEvent event = *new* BusinessEvent();
ksession.execute( Arrays.*asList*( *new* Object[]{input, event} ) );
System.*out*.println( "Business events " + event.getEvents());
*return* 0;
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks
Manikandan
15 years, 11 months
rules not wrking
by Puneet duggal
frnds i have a rule
and its not working and i for checking i have put a Sop in my when but it
not prints the
Inside Area_SqFt_1_10-01-09_12-31-14
so how can we put SOP inside when clause.
rule "Area_SqFt_1_10-01-09_12-31-14"
date-effective "01-Oct-2009" date-expires "31-Dec-2014" salience 6
no-loop true
when
System.out.println("Inside Area_SqFt_1_10-01-09_12-31-14");
objectP2483 : Para_2483( (fid2335=="Block") && (fid2336==16) );
then
System.out.println("Area_SqFt_1_10-01-09_12-31-14");
objectP2483.setFid31003(new Double(497)); end
15 years, 11 months
Good To Have: TaskClient Interface
by tolitius
There is MinaTaskClient and BaseTaskClient, but no TaskClient interface.
That is why:
public void start( long taskId, String userId,
TaskOperationResponseHandler responseHandler )
public void stop( long taskId, String userId,
TaskOperationResponseHandler responseHandler )
public void release( long taskId, String userId,
TaskOperationResponseHandler responseHandler )
public void suspend( long taskId, String userId,
TaskOperationResponseHandler responseHandler )
public void resume( long taskId, String userId,
TaskOperationResponseHandler responseHandler )
public void skip( long taskId, String userId,
TaskOperationResponseHandler responseHandler )
public void delegate( long taskId, String userId, String
targetUserId,
TaskOperationResponseHandler responseHandler )
public void complete( long taskId, String userId, ContentData
outputData,
TaskOperationResponseHandler responseHandler )
...
is not a reusable approach (to get rid of Mina, and use something else [
JMS, DB, etc.. ] ). I think it would make sense to create an interface
defining the contract, and program to that interface.
Am I missing something?
Thank you,
/Anatoly
P.S. I know the whole approach is going to change to be pluggable in the
near future, but I find it strange there is no contract/interface that
defines a task lifecycle.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Good-To-Have-TaskClie...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 11 months