Error Inserting events into drools fusion stream
by Ayush
Hi All,
I'm trying to implement drools fusion into my app. The scenario of my app is
as follows:
- Facts will be received continuosly.
- On receving fact I'm generating a new event and adding it into a new
working memory entry point stream. Also I'm adding facts into session coz
I'll be updating them.
- I need to apply rules on continuous stream of events.
- I've not used any camel + spring or pipeline. Are these mandatory to use?
For 1st fact everything works fine but when I receive 2nd fact I'm getting
Now when I'm trying to get entry point on receive of 2nd alarm I'm getting
org.drools.RuntimeDroolsException: Unexpected exception executing action
org.drools.reteoo.PropagationQueuingNode$PropagateAction@9ff411 Caused by:
java.util.concurrent.RejectedExecutionException.
On debug I found that the above exception is coming when I'm calling
session.getWorkingMemoryEntryPoint("MyStream"); Can anyone please help me
that how should I insert facts and events into working memory?
I'd invested ample amount of time searching for this but I'm empty handed.
Guys please help this is very urgent for me. Thanks in anticipation
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-Inserting-event...
Sent from the Drools - User mailing list archive at Nabble.com.
10 years, 9 months
Upgrade from drools 5.4 to 6.0.0-Beta3 - Legacy API Adapter JAR
by MaverickDrools
Hi,
There is not enough documentation on drools v6.0.0-Beta3, but this is what
I'm trying to do.
Our system was designed with 5.3 but then we encountered the issue with
synchronization (https://issues.jboss.org/browse/JBRULES-3283), so we
upgraded to v 5.4.
Things worked fine until we multithreaded the client code due to which we
faced another issue (https://issues.jboss.org/browse/JBRULES-3675)
So finally now, I'm trying to upgrade to 6.0.0-Beta3 since both those issues
should've been fixed with 6.0.0-Alpha1. The problem I'm facing is, I do not
have enough documentation to look at to see how to convert those things. I
went through the slides etc that were posted on the mailing list for the
conferences, but I'm still unable to figure it out correctly..
So, can someone point me to a JUnit or something that I can look at to
figure this thing out?
static {
KieServices ks = KieServices.Factory.get();
KieRepository kr = ks.getRepository();
Resource res = ks.getResources().newFileSystemResource(
"src/main/resources/rules/abc.drl");
KieModule kModule = kr.addKieModule(res);
kc = ks.newKieContainer(kModule.getReleaseId());
}
throws an exception on kr.addKieModule(res) which says Error in opening zip
file.. I assume we are now expecting a jar instead of a plain drl file. Is
there a way to convert this drl into a jar that the 6.0 code can understand
(for compatibility purposes with the existing system)?
Another thought was to make use of the Legacy API Adapter JAR, but I
couldn't find any examples of the same. Can you point me to a code
sample/JUnit that could explain how this works?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Upgrade-from-drools-5-4-to-6-0-0-Beta3-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
java.lang.NullPointerException when using a custom operator
by Hezi Stern
Hi all,
I have been working with Drools 5.2.0 on windows xp and I have a stable
project.
I upgraded to windows 8, drools 5.5.0 and upgraded to eclipse Juno (from
Helios).
I have now encountered a strange problem with my existing drools project. I
have a accustom operator called supersetof which now results in the
following error reported in the IDE in any file where the supersetOf is used
(LHS):
Error: java.lang.NullPointerException
After receving this error the drools parser does not work, hence this is the
only error I have.
I have tried to use the Drools 5.2.0 again (on the new windows 8 machine)
but I get the same problem so I guess it has to do with some IDE\eclispe
configuration or compatibility issue.
Obviously not the drools project code as I have not made any changes to the
working project.
I did make sure the custom operator is configured similar to the way it was
on my previous computer.
Any ideas? Is there a different configuration for Juno?
Thanks,
Hezi
10 years, 9 months
Guvnor enumerations
by Stephen Masters
Hi folks,
I don't suppose anything notable changed between 5.3 and 5.5 in the way Guvnor loads data enumerations?
I have a number of enumerations similar to the following:
'MyFact.currencies' : (new com.myapp.guvnor.enums.CurrencyEnum()).isoCodes()
But I see the exception in Guvnor:
Unable to load enumeration data.
[Error: unable to invoke method: isoCodes] [Near :{... 'MyFact.': ….}] ^ [Line: 1, Column: 1]
Error type: org.mvel2.PropertyAccessException
The jar is in the lib directory, there is a method called "isoCodes()", and when I run the main class inside it then the various enumerations are returned. And yes, it did (does) work absolutely fine in 5.3 with this same configuration.
Steve
10 years, 10 months
Planner with a list of planning variables
by Justin Case
Hello all,
can I use as planning variable a list of values?
Here's a test use case: planning a food recipe, where the recipe can have say maximally 5 ingredients (taken from the solution property, I guess). So far I could find in the examples and documentation, it's all about ONE planning variable in the solution, but here I'd need a LIST of such... is it actually doable this way?
I cannot do it the other way around, as an ingredient may be found in more recipes...
Many thanks,
JC
10 years, 10 months
Optaplanner: Unexpected global [scoreHolder]
by jonathan.labin
I am using Optaplanner 6.0.0-Beta2 and I am in some cases receiving the
following error during initial solution construction:
Exception in thread "main" java.lang.RuntimeException: Unexpected global
[scoreHolder]
at
org.drools.core.common.AbstractWorkingMemory.setGlobal(AbstractWorkingMemory.java:515)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.setGlobal(StatefulKnowledgeSessionImpl.java:360)
at
org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.resetKieSession(DroolsScoreDirector.java:83)
at
org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.setWorkingSolution(DroolsScoreDirector.java:74)
at
org.optaplanner.core.impl.solver.scope.DefaultSolverScope.setWorkingSolutionFromBestSolution(DefaultSolverScope.java:176)
at
org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:176)
at
org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:154)
I noticed this error in gist:
https://gist.github.com/ge0ffrey/5236604
If this is the same error, what are the current constraints that I need
adhere to in order to avoid this error?
Jon
--
View this message in context: http://drools.46999.n3.nabble.com/Optaplanner-Unexpected-global-scoreHold...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
Date equal comparison fails - don't understand why
by Saloojee, Karim
Hi
I am comparing SimpleAccount( dateAccountOpened == "5-Feb-2011")
where dateAccountOpened is "Sat Feb 05 00:00:00 GMT+02:00 2011" (if you
call toString()). The equal comparator fails (==) but the greater than
comparator passes (>) which I don't understand.
I feel I am missing something obvious here, but I have no idea what it
is.
rule "Test date equality"
when
$acc : SimpleAccount( dateAccountOpened == "5-Feb-2011")
then
System.out.println("Expected and found an account opened
on 5-Feb-2011: " + $acc);
end
rule "Some dates are more equal than others"
when
$acc : SimpleAccount( dateAccountOpened > "5-Feb-2011")
then
System.out.println("Unexpected match: " +
$acc.getDateAccountOpened());
end
Regards,
Karim
To read FirstRand Bank's Disclaimer for this email click on the following address or copy into your Internet browser:
https://www.fnb.co.za/disclaimer.html
If you are unable to access the Disclaimer, send a blank e-mail to
firstrandbankdisclaimer(a)fnb.co.za and we will send you a copy of the Disclaimer.
11 years
Transaction problems in high concurrency JBPM+Drools+Hibernate instalation
by Alberto R. Galdo
Hi guys,
We have an application built around long running JBPM processes with a
large user base and high concurrency ... early on we began to have issues
with transactions in JBPM and nowadays are watching lots of different
realizations of transaction managing problems that lead to dead human tasks
( state: ERROR ), errors running processes and so on ( different
exceptions follows ):
13:22:48,261 WARN [org.drools.persistence.jta.JtaTransactionManager]
(pool-11-thread-1) Unable to commit transaction:
javax.transaction.RollbackException: ARJUNA016053: Could not commit
transaction
Caused by: javax.persistence.PersistenceException: error during managed
flush
Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not
commit transaction.
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
at
org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:179)
[drools-persistence-jpa-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
Caused by: javax.persistence.PersistenceException:
org.hibernate.HibernateException: Flush during cascade is dangerous
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361)
[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289)
[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
11:46:23,754 ERROR [stderr] (schedulerVT_Worker-8)
javax.persistence.PersistenceException: org.hibernate.HibernateException:
proxy handle is no longer valid
11:46:23,754 ERROR [stderr] (schedulerVT_Worker-8) at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361)
11:46:23,755 ERROR [stderr] (schedulerVT_Worker-8) at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289)
11:46:23,756 ERROR [stderr] (schedulerVT_Worker-8) at
org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:261)
11:46:23,756 ERROR [stderr] (schedulerVT_Worker-8) at
So, we're running this installation by the manual. Are using JBoss 7 as
application server, it's transaction manager, Hibernate 4.x as entity
manager, our connection pool delivers READ_COMMITED connections ( so does
hibernate ) ...
Is there anything else we should be doing to avoid this transactional
problems? Has anyone ever tested JBPM in such concurrent scenario? Any
experiences?
Alberto R. Galdo
argaldo(a)gmail.com
11 years
Drools Decision Table with no rules matches blank rule
by srtatz
I have an xls file with the appropriate header lines to make the xls a Drools
Decision Table that I provide to my users. I validate the content/data they
enter, but do allow it to be "blank", that is, no user data, just the Drools
Decision Table key words, conditions, actions, etc.
When using the stateful knowledge session built using the Drools Decision
Table, I insert an object implementing AgendaEventListener and override the
afterActivationEvent method to record on the object which row was hit. I
found that it is saying it hit the first row in the Drools Decision Table
after the header information. But that corresponds to a blank line, since
the table is blank. It seems to have generated a blank drl rule behind the
scenes with no conditions (so it always succeeds) and no actions. Since I
have logic based on whether or not a rule was successfully selected, this
selection of a non-existent rule breaks my code.
The user won't really be using a blank spreadsheet, but I need to cover the
situation. The validation is pretty set in stone right now so I don't want
to force the user to have some data.
Can anyone suggest an easy way to stop it from matching the blank line?
Thanks,
Steve
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Decision-Table-with-no-rules-mat...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years