Re: [rules-users] RuleFlowProcessFactory - no XML output?
by Jeff Parks
I should have mentioned that I am using Drools 5.1.1
From: Jeff Parks [mailto:jeff.parks@comcast.net]
Sent: Tuesday, August 31, 2010 4:33 PM
To: 'rules-users(a)lists.jboss.org'
Subject: RuleFlowProcessFactory - no XML output?
I like the idea of creating a Drools Process via the Process API. It fits my
usage model very well . What surprises me is that I have not seen a way to
take the RuleFlowProcess and create a Process in XML format, which I would
think to be a natural extension. I have to think I am missing something -
can someone share me some code snippet that accomplishes my goal?
thanks
14 years, 2 months
Multiple StatefulKnowledgeSessions at a time?
by skasab2s
Hello,
(I'm sorry if this question already has been asked.) My company uses Drools
for answering questions. For every asked question, a new
StateFulknowledgeSession is created and after the question has been answerd
by Drools, the StateFulknowledgeSession is being disposed. Now we have the
situation that multiple questions can be asked at the same point of time.
That's why we have to decide if we should have only one
StatefulKnowledgeSession at a time (i.e execute the questions sequentially)
or allow parallelism (i.e. have many instances of StateFulknowledgeSession
at one time). Which from the both alternatives would you propose to use? On
what could depend our decision?
Many thanks and best regards,
Svetlomir Kasabov.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Multiple-StatefulKnow...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
Getting rule's body to application.
by tom ska
Hello,
what I want to do, is to get rule's body(rule's code written in DRL). For
example: I have a ConsequenceException, and I can get rule's name, and
package this way:
.
.
.
catch (ConsequenceException e) {
e.getRule().getName();
e.getRule().getPackageName();
}
But for me it is not enough. I want to see rule's code. haw can I get it?
Thanks,
tom.
14 years, 3 months
How can I know, how many facts are processed by stateFulSession?
by tom ska
Hello,
I have a class and rule:
class CTestObj
{
private double value;
void setValue(double v) {
this.value = v;
}
double getValue() {
return this.value;
}
}
rule "r1"
when
p : CTestObj
then
p.setValue( 1 / p.getValue() );
end
As you can see, in this rule, there is risk, to put into stateFulSession
object with value set 0. I can't validate this, because, this problem has a
variation where I put into stateFulSession object with set no 0, but the
rule will modify it...
So - I can't validate this = fact with value 0 is correct.
But I process with stateFulSession many, many facts... For example 1000.
And, after 900 facts it occurs, that fact number 901 has value set on 0. In
effect I get an exception: org.drools.runtime.rule.ConsequenceException:
java.lang.ArithmeticException: / by zero. And ksession stops processing
facts. But, 900 facts are processed! I don't want to process them second
time.
And this is my question:
How can I know, which fact is first no-processed fact? Which one stoped
fireAllRules method?
Beacuse I don't want to process them another time.
Greetings :)
tom.
14 years, 3 months
RuleFlowProcessFactory - no XML output?
by Jeff Parks
I like the idea of creating a Drools Process via the Process API. It fits my
usage model very well . What surprises me is that I have not seen a way to
take the RuleFlowProcess and create a Process in XML format, which I would
think to be a natural extension. I have to think I am missing something -
can someone share me some code snippet that accomplishes my goal?
thanks
14 years, 3 months
Configuring workitem handlers using guvnor
by KiranP
i am integrating guvnor into my already existing code which uses Drools
ruleflow, spring, JPA
i have configured earlier, workitem to handler mapping, using 2
configuration files as follows :
*********************CustomWorkItemHandlers.conf****************
[
"Task" : new org.mkcl.insync.process.handlers.TaskHandler(),
"Email" : new org.mkcl.insync.process.handlers.EmailHandler(),
"UpdateProfile" : new
org.mkcl.insync.process.handlers.UpdateProfileHandler(),
]
***********************************************************
and
*********************drools.session.conf****************
drools.workItemHandlers = CustomWorkItemHandlers.conf
***************************************************
how can i now configure the above files in Guvnor so that i can change the
handlers from guvnor itself
Thanks,
-----
Keep Working >>
KiranP
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Configuring-workitem-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 3 months