Problem with salience
by jmolly
Hello.
I'm facing some problems in drools with salience. (maybe I don't understand
how it works)
We have a rule that check if an import has been satisfied by the client. But
we have a lot of pay methods so, when the import has been satisfied, we have
to stop all the payment devices. If a payment device is in use, we can't
stop it, so we send stop commands until device can stop.
The problem is that if a device is making a pay process, and consumes an
event, that event is never fired.
Maybe I can explain better with code:
rule "Pay device stop"
Salience 10
Try to stop the device and sends an OPERATION_IN event if can't stop
(because there is a ticket inside)
Machine rule
rule "Operation in received witch devices not stopped"
salience 10
Sent stop events to all devices
Machine rule
rule "Operation in received with devices stopped"
salience 10
All ok. Finish operation
rule "Ticket data read"
salience 1000
updates the debt for the user and sends an OPERATION_IN
The pay hardware, when is reading a ticket, sent a TICKET_DATA_READ
this rule has salience 100 and should be fired inmediatly but Drools is
entering all time in a bucle from Operation in received and Pay stop device.
Can someone give a clue about what are we doing wrong?
Sorry for the english. I can post the original code if needed.
Thanks in advance
--
View this message in context: http://drools.46999.n3.nabble.com/Problem-with-salience-tp3148382p3148382...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
How to periodically iterate over all facts in a stream
by isakdim
My initial attempt is for the application to periodically set focus to the
"SomeAgendaGroup" and then wait for rule(s) to call
GlobalServiceProvider.someService. On the first agenda activation, the rule
iterates through all events. On the following agenda activations, the rule
iterates only through the events that have been inserted since the last
activation.
rule "Iterate over all events in the SomeStream"
agenda-group "SomeAgendaGroup"
when
$someEvent : SomeEvent() from entry-point "SomeStream"
then
GlobalServiceProvider.someService($someEvent);
end
Is there a way to implement a rule so that it iterates through all events
each time its agenda-group is activated or a different way to implement this
task?
Thank You!
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-periodically-iterate-over-all-fa...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years
Performance optimization guidelines for Drools
by Wishing Carebear
Hello,
I'm trying to run a ruleflow (sequence of only rules) using Statteful and
stateless session. Could you please point me to any performance optimization
guideliness.
Thanks
15 years
Drools Ruleflow deadlock issue[thread]
by dhinesh kumar
Hi
I am getting the below error while creating the ksession.startProcess() instance in multithread.
i.e. two thread calling the ksession.startprocess() with the ruleflow as
based on initial testing i identified due to delete or update sql operation the below is appearing. Please let me know how to solve this issue
ERROR LOG:
Hibernate: delete from ProcessInstanceInfo where InstanceId=? and OPTLOCK=?
Hibernate: delete from ProcessInstanceInfo where InstanceId=? and OPTLOCK=?
2011/07/04 11:20:06.475{UTC} [JDBCExceptionReporter : JDBCExceptionReporter.java: logExceptions: 100] [RMI TCP Connection(6)-10.50.53.32]: WARN: : SQL Error: 60, SQLState: 61000
2011/07/04 11:20:06.475{UTC} [JDBCExceptionReporter : JDBCExceptionReporter.java: logExceptions: 101] [RMI TCP Connection(6)-10.50.53.32]: ERROR: : ORA-00060: deadlock detected while waiting for resource
2011/07/04 11:20:06.475{UTC} [AbstractFlushingEventListener : AbstractFlushingEventListener.java: performExecutions: 324] [RMI TCP Connection(6)-10.50.53.32]: ERROR: : Could not synchronize database state with session
org.hibernate.exception.LockAcquisitionException: could not delete: [org.drools.persistence.processinstance.ProcessInstanceInfo#8130]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:112)......
Regards
Dhinesh Kumar V
15 years