Blurring the lines of jBPM and Drools
by keithnielsen
I have been researching both jBPM and Drools for sometime now and am
wondering what the future holds for jBPM. This is based on my research of
Drools 5, which is bringing what I would consider more BPM constructs into
the core engine, things such as Wait States, Human Tasks, etc. One of the
main things I don't see yet is the whole persistence and support of long
running processes. My question is will the trend with Drools continue,
eventually consuming jBPM?
I must say that my perception is that Drools is more active which makes me
wonder if I should go with Drools hoping that it builds out more BPM
features going forward.
Thanks
--
View this message in context: http://www.nabble.com/Blurring-the-lines-of-jBPM-and-Drools-tp20099731p20...
Sent from the drools - user mailing list archive at Nabble.com.
14 years, 1 month
ksession.dispose() and DroolsSpringJpaManager.dispose()
by drooRam
I have question on kession.dispose(), what is the best place to call this
method?
I have a code where in i call
ksession.startProcess("someprocess", mapParam);
ksession.fireAllRules();
....
finally{
ksession.dispose();
}
If i invoke the kession.dispose() like the above, I always ended up in "No
value bound to the key" - Transaction exception.
My understanding is that all the calls to drools should be enclosed in a
transactional unit. I have done that so.
My observation is that DroolsSpringJpaManager.dispose() method is being
invoked due to my call to ksession.dispose() after the transaction has begun
from my app code and right before the transaction.aftercompletioncommit()
call.
I can see a line of code in DroolsJpaManager.dispose() method,
TransactionSynchronizationManager.unbindResource(this.emf) //
entityManagerFactory reference borrowed from application code.
My question is that why the above line of code is necessary in dispose()
method since this.emf is the reference obtained from Application code jpa
manager, since this method unbinded this resource, transaction initiated
from the application code is also trying to unbind the same resource once
everything is completed results to "No value found for this key exception".
When i comment out ksession.dispose() call from my app code, it works fine.
At this point, i am not sure when to invoke ksession.dispose() call and why
the TransactionSynchronizationManager.unbindResource(this.emf) being made
in DroolsSpringJpaManager.dispose() on a reference obtained from
JpaTransactionManager ?
-drooRam
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/ksession-dispose-and-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 1 month
Resuming a simple process involving human task
by Touma
Hi all,
For the past few weeks I've been trying to get a simple drools flow example
involving human tasks up and running. I've done quite a bit to the point
that my session, process, task and workitems are being persisted in the
database. Here is what my flow looks like:
Start -> Ruleflow -> Decision node -> Human Task -> Printing Node -> End
The work item handler for the Human task simply performs the task of
persisting the Task instance. After reaching the Human Task, the flow stops
and the state is persisted. But how would I go about restarting/resuming the
flow so that the 'Printing node' is reached? I've tried using the
loadStatefulKnowledgeSession(sessionId) to load the session but querying the
list of all the processes for the given session returns an empty list. Ditto
with the list of all the process events. I have all the ID's with me
(workitem, process, task, session) but am pretty confused as to how these
can be put to use to resume my suspended workflow.
Any pointers would be much appreciated. TIA.
Peace,
/T\
--
View this message in context: http://n3.nabble.com/Resuming-a-simple-process-involving-human-task-tp716...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 1 month
Using rule flow in Guvnor
by Dinesh kumar
Hi,
I am having an issue in implementing the rule flow in guvnor.
I created a simple rule flow using eclipse plug in.
http://drools-java-rules-engine.46999.n3.nabble.com/file/n1057004/rules.jpg
I checked the rule flow model in eclipse using the green tick mark and it
showed Drools flow model checked successfully. My .rf and .rfm files were
created.
But when I imported .rf file in my guvnor and build the package I am getting
the following error : Unable to parse xml
When i checked the server log, only this was printed :
(null: 1, 93): cvc-elt.1: Cannot find the declaration of element
'org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper'.
This is the source of the generated .rfm file
1
1
Start
1
ailmentreserves
2
AilmentReserves
1
benefitreserves
3
BenefitReserves
1
4
End
2
3
4
4
resistrationflow
RuleFlowTest
1.0
RuleFlow
HealthCareTest
Am I missing anything. Should the package name in the eclipse same as the
package I use in guvnor ?
I have only the rule flow file in Eclipse and remaining are written directly
in guvnor.
Any hint on this will be of great help.
Regards,
Dinesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-rule-flow-in-Gu...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 1 month
Looking for a place to start with drools
by Dean Whisnant
I am investigating using Drools for our company's EDI processing. The nature of our software system is that each of our clients (dozens) has a full distribution of our base software and in the past we would make custom changes to that base software at each of their sites based upon their trading partners and business needs. For the most part these changes involved nothing more than if-then statements for rather simple logic, but that would become complicated at certain customers where there were large numbers of trading partners and specific customer needs. In general we saw 2,000 lines of code swell to 4-6,000 lines of code.
We are in the process of rewriting this portion of our code and are entertaining using drools to allow us to 1) create a standard ruleset, 2) create a ruleset specific to a trading partner (many customers share some common trading partners), and 3) create a customer business ruleset that they can maintain through some GUI tool (Guvnor).
So far, I've created a sample java program that has classes representing some of our data files (UniData environment using uniobjects) and have been working with a single .drl file to test out general rules. I appear to be able to write just about any rule I've needed in the past with no issues, including rules that spawn processes within my native software.
These are my questions:
1. How would you package these types of rules? I have three categories as stated above and it seems logical that I would package them in that manner. However within each group there are logical groupings of rules. In the customer rules I may have a couple dozen on how to populate a field that deals with adding comments and another couple dozen having to deal with setting certain fields with specific codes that are based upon incoming data. Two quite different logical areas within our software.
2. How would you deal with the GUI? Is Guvnor truly something I can setup in a way that my end users can manipulate without "damaging" the custom ruelset?
3. Within Guvnor, how would you handle the possibility of there being over 2,000 fields to choose from to form a rule?
4. What is the performance hit if we were to make each customer rule part of once decision table or another? Would you even consider this as an option?
Thank you!
--Dean
14 years, 1 month
Memory usage tied to rule report?
by Jared Davis
Hi,
I'm attempting to track down an out of memory error.
I have ~400 rules that operate on ~10000 facts. One set of facts throws an
out of memory error while other sets process w/o an error. It is easy to
reproduce.
When the system runs out of memory there are about 22,000,000 ReteTuple
objects active.
I assume I have a bad rule producing a large cross product.
How do I find it?
Is there an audit tool that will let me tie ReteTuple back to a specific
rule?
Regards,
Jared Davis
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Memory-usage-tied-to-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 1 month
Matching strings in two arrays
by Kumar Pandey
Drools 5.1.0
I have a need to match list of incoming strings to those in the rule. All
the strings in the fact object needs to exists in the rule.
I have a large set of rules around 5000.
In general I have around 4 conditions per rule and its taking in average
around 30- ~40 ms to go through the 5000 rules.
However the following construct that I am using to match the incoming set of
input strings is adding on the average 200ms to rules execution.
Is there a more efficient way to do this?
MyContext is the fact class and classes is array of String.
I need to make sure that the classes array contains all three
strings TestString1, TestString2 and TestString3.
MyContext(DclassesList : classes)
exists( String(this matches "TestString1") || String(this matches
"TestString2") || String(this matches "TestString3") from DclassesList)
Of course each rule in the 5000 can have diff set of strings to match.
Thanks
14 years, 1 month
Error in named query: ProcessInstancesWaitingForEvent
by Eugenio Abello
Hi, I'm using drools 5.1.1 with persistent flow and Human Task. In orm.xml
are queries Flow and HT. But among this error initializing JPA:
ERROR 24-09 17:20:36,375 - Error in named query:
ProcessInstancesWaitingForEvent
org.hibernate.QueryException: cannot dereference scalar collection element:
name [select processInstanceInfo.processInstanceId from
org.drools.persistence.processinstance.ProcessInstanceInfo
processInstanceInfo where :type in
(processInstanceInfo.eventTypes.name<http://processinstanceinfo.eventtypes.name/>
)]
thanks
14 years, 1 month
Drools with Spring Batch
by Manav
Hi,
I am trying to integrate Drools with Spring Batch. Is there some documentation
that could throw some light on the configuration involved in the same.
Regards,
Manav
14 years, 1 month